how to write a json code to check the account details using the caller number when customer contacted the agent in medicare field using CXONE AND CRETE A CASE
CXone posts the call json document to crm which includes cx transaction Id(Contact ID), User type , member id, email, phone , start time , end time and call transcript
for each cxone call transaction , it will be posted to CRM endpoint twice.
As soon as cx one call intiated cxone posts the transaction id to azure function
in CRM CX one call activity ID surecreated for the call and then sent to cxone in response.
after cxone call has ended cxone posts transaction id along with the call transcript to crm azure function .Call recording is updated to the corresponding cxone call and activity ID.
If cxone transation id in the json document is already exists , the update the existing cxone activity id
If cxone transation id in the json document is does not exists , then create the new cxone activity id
if user type is Member/ provider, Then look for memberid in the json document
if user type is caller id then look for the caller id in the Json document AND RETRIVE THE ACCOUNT DETAILS.
if caller id 1234567890, a 10 digit phone number. then we will be attached this call activity to the unknown member maintained in D365
D365 WILL HAVE UNKNOWN CALLER ID WITH 1111111111 ALREADY IN PLACE