feat: Upadate pyload properties to send client phone to the whatsapp official billing api

merge-socket
adriano 2024-08-13 10:43:32 -03:00
parent 69246d3d93
commit dc44dccd82
1 changed files with 4 additions and 1 deletions

View File

@ -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
});