PureCloud for Salesforce - Retrieve "Participant Data" via code

Hi,

I know that it is possible to set custom parameters in PureCloud that you can access in Salesforce (via "Set Participant Data") and display in the script of the CTI plugin, but I would assume that it is also possible to access the sent parameters from code on Salesforce side? What I would like to do is the following;

  1. Create a case in Salesforce via PureCloud using the Salesforce REST API:
  • I have successfully done this via Salesforce REST API with the "Salesforce Data Actions" integration by using a custom action.
  1. Send the case id received from the custom action to Salesforce:
  • I understand this can be done via "Set Participant Data" and then using "Participant.SomeCustomParameter" in Salesforce.
  1. Retrieve the case id from code (on Salesforce side):
  • I would assume that it is possible to listen for the "connected" event from PureCloud and that the custom parameter would be there, but I have not been able to test this because of my lack of knowledge of Salesforce API. Does anyone know if this is possible?
  1. Use Salesforce "Lightning Console JavaScript API for Lightning Experience" to open a tab with the case id received from PureCloud:
  • I know that it is possible to open a tab, but the missing part here is how to use the case id received from PureCloud and if this approach is even possible.

The idea here is that the newly created case would screen pop in Salesforce. I know that there is a default "screen pop" in Salesforce via the plugin, but I have been told that it's not possible to use this because Salesforce wouldn't have had enough time to index the new case. Therefore I have to use the case id PureCloud received from the API call to Salesforce.

Any help on the matter is greatly appreciated. Thanks.

I don't think any of that is necessary. You should be able to take the case ID that is returned when you create the case via data action, then set that as the SF_URL search value: https://help.mypurecloud.com/articles/screen-pop-a-salesforce-search-result-for-inbound-calls-emails-and-messages-in-purecloud-for-salesforce/

Setting the object ID as the search value should bypass any indexing in place on the salesforce side of things and take you directly to your page. Searching Salesforce for attributes inside the case (like a friendly case number, phone number, etc.) can take some time, usually less than a minute; but searching for object IDs makes those items accessible nearly instantly.

Addressing your other questions, Lightning has not exposed custom console events to register for messages from the client. Those are currently only available in the service console: https://help.mypurecloud.com/articles/use-salesforce-console-events-in-purecloud-for-salesforce/

Thank you for the answers, Richard!

The customer uses Lightning Experience, it should still work the same way? (Just to be sure, as the example shown uses Service Console).

I couldn't use SF_SearchValue because I don't have the Case Number, I have the Case Id. Changed the attribute to SF_URLPop instead and now it finally works!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.