diff --git a/backend/src/controllers/WhatsAppController.ts b/backend/src/controllers/WhatsAppController.ts index c6eea35..d6c2077 100644 --- a/backend/src/controllers/WhatsAppController.ts +++ b/backend/src/controllers/WhatsAppController.ts @@ -697,12 +697,15 @@ async function setCBP(msg_id: any, company_phone: any, client_phone: any, conver async function sendToAPIUsage(msg_id: any, company_phone: any, client_phone: any, conversation_type_category: any, ticketId: any, billable:string, pricing_model:string) { const data = JSON.stringify({ - "companyId": company_phone, + "companyId": process.env.COMPANY_ID || company_phone, + "companyPhone": company_phone, + "clientPhone": client_phone, "provider": "meta", "product": "whatsapp", "type": conversation_type_category, "msgId": msg_id, "ticketId": `${ticketId}`, + "ticketUrl": `${process.env.FRONTEND_URL}/tickets/${ticketId}`, "billable": billable, "pricing_model": pricing_model });