Call log is not getting created for customer's acccount

Hi @velmurugan

payload is in desired format. content-type is correct because the api in same format is working for my internal account but the same api on replacing url and apikey of customer’s account it is not working. Below is proof. In both request only url,authorization and callID differs which should not impact api’s functionality.

Please check and update. This is impacting integration for customer.

Aoi call for our internal account
{ method: ‘POST’,
url:
https://knowlaritycommunicationspvtltd.myfreshworks.com/crm/sales/api/cti_phone_calls’,
headers:
{ authorization: ‘Token token=apikey’,
‘content-type’: ‘multipart/form-data;’ },
formData:
{ phone_call:
‘{“call_direction”:true,“note”:{“description”:“Details of the call:\n Time: 2021-05-31 12:39:42.932414+00:00\n Customer: +919030311320\n Business Number: +917669635593\n Action: Call Group\n Call Status: +918657488843\n Agent: +918657488843\n Call ID: 204ccb33-e260-454c-adb4-f4d8a4155816”},“targetable_type”:“contact”,“number”:"+919030311320",“targetable”:{“last_name”:"+919030311320",“mobile_number”:"+919030311320"}}’ },
json: true }
api response - { contacts:
[ { partial: true,
id: 70004343460,
first_name: null,
last_name: ‘+919030311320’,
display_name: ‘+919030311320’,
avatar: null,
email: null,
work_number: null,
mobile_number: ‘+919030311320’,
job_title: null,
last_seen: null,
has_access: true,
lead_score: 0,
sales_accounts: ,
owner_id: null,
deal_ids: } ],
phone_numbers: ,
phone_callers:
[ { id: 70000034105,
number: ‘+919030311320’,
country: ‘IN’,
state: null,
city: null } ],
notes:
[ { id: 70000429490,
description:
‘Details of the call:\n Time: 2021-05-31 12:39:42.932414+00:00\n Customer: +919030311320\n Business Number: +917669635593\n Action: Call Group\n Call Status: +918657488843\n Agent: +918657488843\n Call ID: 204ccb33-e260-454c-adb4-f4d8a4155816’,
created_at: ‘2021-07-22T13:44:52+05:30’,
updated_at: ‘2021-07-22T13:44:52+05:30’,
url: null,
duration: null,
creater_id: 70000010327,
has_access: true,
collab_context: [Object],
targetable: [Object] } ],
user:
[ { id: 70000010327,
display_name: ‘Gourav Kumar’,
email: ‘konnect.developer@knowlarity.com’,
is_active: true,
work_number: ‘+918130900734’,
mobile_number: ‘+918130900734’ } ],
users: ,
outcomes: ,
phone_calls:
[ { id: 70000183257,
call_duration: null,
call_direction: true,
recording_duration: null,
status: ‘incoming’,
recording: null,
conversation_time: ‘2021-07-22T13:44:52+05:30’,
cost: 0,
is_manual: true,
root_phone_call_id: 70000183257,
child_phone_calls: null,
outcome_id: null,
source: null,
freshcaller_id: null,
freshcaller_number: null,
freshcaller_number_country: null,
targetable: [Object],
phone_number_id: null,
phone_caller_id: 70000034105,
note_id: 70000429490,
user_id: null } ],
deals: }
Api response code - 201

Api call for customer’s account
{ method: ‘POST’,
url:
https://sulekhae-learn.myfreshworks.com/crm/sales/api/cti_phone_calls’,
headers:
{ authorization: ‘Token token=apikey’,
‘content-type’: ‘multipart/form-data;’ },
formData:
{ phone_call:
‘{“call_direction”:true,“note”:{“description”:“Details of the call:\n Time: 2021-05-31 12:39:42.932414+00:00\n Customer: +919030311320\n Business Number: +919311583196\n Action: Call Group\n Call Status: +918657488843\n Agent: +918657488843\n Call ID: 204ccb33-e260-454c-adb4-f4d8a4155816”},“targetable_type”:“contact”,“number”:"+919030311320",“targetable”:{“last_name”:"+919030311320",“mobile_number”:"+919030311320"}}’ },
json: true }
Api response - { error_code: 422 }
Api response code - 422

1 Like