You need to sign in to do that
Don't have an account?
NICHOLAS BLANCHARD
Live Agent Rest API using cURL
Hi,
I'm currently testing out Live Agent in development. If I understand correctly I should be able to test out the rest API by executing some cURL commands and passing the correct information. I'm able to execute the System/SessionId request and get back the response with the key, id, and affinity token. However when I try to execute the Chasitor/ChasitorInit request it fails with this:
"An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. Error ID: 1312603297-5809 (119858002)"
Here's the command that I'm using for the request, with the deployment specific fields omitted.
Is there something that I might be missing here?
Thanks.
I'm currently testing out Live Agent in development. If I understand correctly I should be able to test out the rest API by executing some cURL commands and passing the correct information. I'm able to execute the System/SessionId request and get back the response with the key, id, and affinity token. However when I try to execute the Chasitor/ChasitorInit request it fails with this:
"An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. Error ID: 1312603297-5809 (119858002)"
Here's the command that I'm using for the request, with the deployment specific fields omitted.
curl -i --header 'Content-Type: application/json' —-header 'X-LIVEAGENT-AFFINITY: affinitytoken' --header 'X-LIVEAGENT-API-VERSION: 29' --header 'X-LIVEAGENT-SESSION-KEY: sessionkey' --header 'X-LIVEAGENT-SEQUENCE:sequence' -X POST -d "{ 'sessionId':'sessionid', 'organizationId': 'orgid', 'buttonId': 'buttonid', 'deploymentId': 'deploymentid', 'userAgent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36', 'language': 'en-US', 'screenResolution': '1920x1080', 'prechatDetails': [], 'visitorName': 'John A.', 'receiveQueueUpdates': true, 'isPost': true, 'prechatEntities':[]}" https://endpoint/chat/rest/Chasitor/ChasitorInit
Is there something that I might be missing here?
Thanks.
I just replicated (6/11 2:43pm MDT) this issue slightly differently, this is the error I'm getting now:
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. Error ID: 1396150787-2806 (2074802041)
This happens when I add the prechatDetails to the curl request like this:
curl -v -H 'X-LIVEAGENT-AFFINITY: affinitytoken' -H 'X-LIVEAGENT-API-VERSION: 29' -H 'X-LIVEAGENT-SESSION-KEY: sessionkey' -H 'Content-Type: application/json' https://d.la3-c1-was.salesforceliveagent.com/chat/rest/Chasitor/ChasitorInit -d '{ "sessionId":"sessionId", "organizationId": "org_id", "buttonId": "button_id", "deploymentId": "deployment_id", "userAgent": "", "language": "en-US", "screenResolution": "1920x1080", "visitorName": "John A.", "prechatDetails": [{"label":"contactFirstName","value":"Bob","transcriptFields":["contactFirstName__c"],"displayToAgent":true}], "prechatEntities":[], "receiveQueueUpdates": true, "isPost": true }'
Do you see anything wrong with the way the prechatDetails is defined here?
Thanks.
Please see if the workaround provided works for you until it is fixed.