Configure Screen Pops in CXone Agent for Salesforce
This is the fourth step of setting up CXone Agent Embedded in Salesforce. This step is optional. You can skip to the next step: configure workflows.
When an agent receives an interaction, CXone Agent Embedded for Salesforce (CXone Agent for Salesforce) can display a screen pop to the agent. You can configure the following kinds of screen pops:
- Pinned Salesforce records
- Salesforce Flow pages
- URLs, including for a Visualforce page
- Salesforce search pages
Configure Salesforce Record Screen Pops
You can configure created records to automatically appear as screen pops in Salesforce. This is part of configuring Salesforce workflows.
-
Open the Snippet for Create Workflow SNIPPET action in your script.
-
In the workflow payload, copy this line of code and paste it before DYNAMIC create[RecordName]Payload:
createPayload.screenPop = "true"
Make sure that createPayload matches the earlier lines in your workflow. For example, if you're using the standard Create Case workflow, this line should be createCase.screenPop = "true".
-
Save your script.
Configure Flow Screen Pop
CXone Agent for Salesforce can display a screen pop to a Flow in Salesforce. This is an option when interactions are delivered to the same browser tab where CXone Agent for Salesforce is active.
This type of screen pop uses a CustomEvent action. If your script requires more than one custom event, use a new instance of CustomEvent for each one.
-
In Studio, open the script you modified for Salesforce integration.
-
Add a SNIPPET action to the script after the ONANSWER or ONASSIGNMENT action.
-
Change the SNIPPET action's Caption property to indicate its purpose, such as Screen Pop to Flow.
-
Open the snippet action's editor and add the following code:
DYNAMIC payloadJSON payloadJSON.contactId="{contactid}" payloadJSON.data.popType = "poptoflow" payloadJSON.data.params.flowDevName = "[Flow_Name]" payloadJSON.data.params.flowArgs = "firstName=[First_Name]&ani={ANI}&lastName=[Last_Name]" ASSIGN reqPayload="{payloadJSON.AsJson()}"
In this snippet:
- popType: This must be set to poptoflow so the screen pop contains a Flow.
- flowDevName: Replace [Flow_Name] with the name of the flow you want to pop.
- flowArgs: Enter one or more arguments to pass as a query string in the URL. This is an optional property.
- Add a CustomEvent action after the Screen Pop to Flow SNIPPET action.
-
Change the CustomEvent action's Caption property to indicate its purpose, such as Send Screen Pop to Flow.
-
Configure the CustomEvent action's EventName property with ScreenPopCustomSettings. Do not use a different event name.
- Save your script.
Configure a URL Screen Pop
CXone Agent for Salesforce can display any URL as a screen pop. You can use this option to display Visualforce pages as screen pops.
To set up this type of screen pop, use the POPURL action in your script. If you want to pop more than one page, you need a POPURL action for each.
Third-party URLs always pop to a new browser tab. Salesforce URLs can pop in the current Salesforce Lightning tab or a new tab, depending on how the agent has configured the Panel Open in Browser setting.
The following images show script examples for voice and digital scripts.
Desktop Studio voice script:
Desktop Studio digital script:
CXone Studio voice script:
CXone Studio digital script:
-
In Studio, open the script you modified for Salesforce integration.
-
Add a POPURL action to the script after the ONANSWER or ONASSIGNMENT action.
-
Configure the POPURL action's URL property with the URL of the page you want to screen pop to agents.
If you want to pop to a Visualforce page, enter your Visualforce URL in this format: https://your-salesforce-instance.visual.force.com/apex/YourVisualForcePage.
-
Save your script.
Configure a Search Screen Pop
You can have a Salesforce search page appear as a screen pop when the agent receives an interaction. This search page displays the results for a search string you configure.
This type of screen pop uses a CustomEvent action. If your script requires more than one custom event, use a new instance of CustomEvent for each one.
-
In Studio, open the script you modified for Salesforce integration.
-
Add a SNIPPET action to the script after the ONANSWER or ONASSIGNMENT action.
-
Change the SNIPPET action's Caption property to indicate its purpose, such as Screen Pop to Search.
-
Open the snippet action's editor and add the following code:
DYNAMIC payloadJSON payloadJSON.contactId="{contactid}" payloadJSON.data.popType = "searchstring" payloadJSON.data.params.searchString = "[string]" ASSIGN reqPayload='{payloadJSON.AsJson()}'
In this snippet:
- popType: This must be set to searchstring so the screen pop contains the search page.
- searchString: Enter the search string. The minimum length is three characters.
- Add a CustomEvent action after the Screen Pop to Search SNIPPET action.
-
Change the CustomEvent action's Caption property to indicate its purpose, such as Send Screen Pop to Search.
-
Configure the CustomEvent action's TargetAgent property with {agentid}.
-
Configure the CustomEvent action's EventName property with ScreenPopCustomSettings. Do not use a different event name.
-
Configure the CustomEvent action's PersistInMemory property with False.
-
Configure the CustomEvent action's Data property with {reqPayload}.
- Save your script.
The next step of setting up CXone Agent Embedded in Salesforce is to configure workflows.