Customization Tasks in Salesforce Agent

Optional tasks include Omni-channel set up and creating quick replies.

Manage General Salesforce Agent Settings

You can modify the maximum number of people allowed in a single call and change whether agents are able to delete commitments.

  1. Click the app selector and select ACD.
  2. Go to ACD ConfigurationBusiness Units.

  3. Locate the business unit you want to modify and click to open it.
  4. In the Details tab, click Edit.
  5. Scroll down to the Salesforce Agent section.
  6. If you want to change your Maximum Number of Conference Parties (including Agent), select a number from the drop-down.
  7. If you want to change whether your agents can delete callback commitments and whether notes are required, set the Delete Commitments field to Can't Remove, Can Remove - With Notes, or Can Remove - Without Notes.
  8. Click Done.

Configure Screen Pops

You can configure and customize screen pops, or windows of information about the contact with whom the agent is currently connected, by creating a query using NICE CXone IVRClosed Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. script variables and specifying certain settings in your Salesforce SoftPhone Layout and data mapping.

A screen pop goes through four phases:

  1. Configure the Softphone Layout in Salesforce. Specify:

  2. Create a script in Studio that opens an existing Salesforce case number for the contact. The script should search for the case and, if the case exists, deliver the number and the call metadata to the Salesforce Extension. If the case number does not exist, the script should send the caller’s phone number (ANIClosed Also known as caller ID. Listed phone number of an incoming voice call.) to the extension, which searches for and opens the caller's contact record.

  3. Create the controlled variables for the script to send to the extension. To do so, use Studio to set the ScreenPop property to TRUE (see the Assign script action for more information) and use one or both of the following methods to create controlled variable queries:

    If you do not create query variables, Salesforce Agent runs a default query, or a query that searches for objects listed in the Salesforce SoftPhone Layout configuration. Salesforce Agent runs the default query for the ANI in the phone number fields of these objects.

    All variables supplied by the script are passed to the VisualForce page as a query string, including query variables and all other published variables. Salesforce stores all published variables in a custom field on the User object where custom JavaScript code, VisualForce, and Apex pages can access them.

    While custom fields can be accessed by custom code, you should only read from them. You should not update or delete them. This can cause unexpected behavior in Salesforce Agent.

  4. In Studio, set the ScreenPopSource property of the Reqagent script action to Default from Skill.

  5. In CXone, enable the Use Screen Pops option for each skillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge you want to run the query. For more information, see Configure Screen Pops.

Configure Custom Buttons

Salesforce allows you to customize the agent’s experience inside the application; for instance, you may want to configure a custom button in Salesforce to allow agents to open a certain page. However, when CXone integrates with Salesforce, you must consider certain pieces of logic and information from the CXone platform before making customizations. This capability allows you to create any logic in the IVRClosed Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. script needed to capture, retrieve, or generate information or metadata about a contact and use it to drive a customized experience within Salesforce while keeping elements of the actual customized experience within Salesforce. This means that you should assign variables to the information or metadata you want to send to Salesforce and publish them. To publish them, you must set the variable ScreenPop property to TRUE. The Salesforce Extension stores these variables as a pipe-delimited list in a custom field on the user object, and they are available to any custom code in the Salesforce environment. A sample use case with code follows the task instructions.

  1. Create a custom button and add it to your page layout. For instance, on the Contact object and page layout. The button could be configured to Execute JavaScript.

  2. Create code that can access NICE CXone variables from the User.Custom_Screenpop_c field. The following code shows how to access data in this field and parse it into a collection of variable names and values for use in your JavaScript.

    {!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
    // get the contents of the field
    var userVal = "{!User.Custom_Screenpop__c}";
    // create an array that splits on the “|” symbol
    var splitVals = userVal.split("|");
    
    // each element of the splitVals array will be in the
    // format of “varName=value”, where “varName” is the variable
    // name published from NICE CXone .
  3. Publish variables from the IVR script that you want to use in the JavaScript code.

Customize the Interface with Studio Actions

You can use Studio actions like Indicate, Messages, Page, and Runapp to customize the Salesforce Agent interface and help guide agents through calls.

  • You can use the Indicate action to allow agents to launch hard-coded links to web pages or applications. These can be common references or resources that agents can quickly access directly from the Salesforce Agent interface. You can also use the Indicate action to generate a custom button that agents can click to open a web page. When a call is active, the button appears at the bottom of the phone control panel if you choose an agent handling a contact as your recipient. Choosing any other recipient causes the button to appear at the top of Salesforce Agent.

  • You can use the Messages action to configure an agent message to appear in the top bar of Salesforce Agent and in the Messages window. You can send a message to a single agent, a team, all agents, or a skillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge. An icon in the marquee displays the number of messages.

    You can also create a message in CXone by setting up Agent Messages.

  • You can use the Page action to automatically open pages you create in Studio as certain events occur in Salesforce Agent.
  • You can use the Runapp action to automatically open a web page when a certain action occurs. Salesforce pages open according to your SoftPhone Layout settings. If the button opens an external web page, these settings are disregarded and the page opens in a new window.

Locale Settings

The locale setting in Salesforce controls how Salesforce Agent displays numbers, currency, and dates. To modify the format of dates and numbers according to your location, you must modify the Locale setting for the user in Salesforce. These settings also allow you to enable localization for Salesforce Agent. The user language selection in Salesforce controls the language selection for Salesforce Agent, but you must enable languages for users to apply them. Salesforce supports the following languages:

  • Chinese (Simplified)
  • Chinese (Traditional)
  • English
  • French
  • German
  • Italian
  • Japanese
  • Korean
  • Portuguese
  • Russian
  • Spanish

Proper names and the names of custom unavailable codes are not localized unless you entered them in CXone using the appropriate language.

  1. Click Setup in the upper right corner.

  2. Use the Search box to search for Users, then click Users.

  3. Click Edit next to the user you want to modify. Do not click the Full Name.

  4. In Locale Settings, update the Locale and Language fields to the preferred locale and language.

  5. Click Save.

Enable Service Cloud User

Enabling the Service Cloud User positions the agent interface as a minimized bar in the lower right corner of the screen. The bar flashes to indicate an incoming contact.

This option is only available to users using the Service Cloud component. If you do not see the Service Cloud User option for your agents, follow the steps below to enable Service Cloud User on your own profile.

  1. Click the drop-down arrow next to your username and select Setup.

  2. Use the Search box to search for Manage Users, then click Users.

  3. Click Add or edit users and set user quotas.

  4. Click Edit next to the user you want to enable with Service Cloud User. Do not click the Full Name.

  5. Select the checkbox next to Service Cloud User.

  6. Click Save.

Enable Personal Connection

  1. Contact your CXone Account Representative to enable PC in your business unitClosed High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment.
  2. Create a PC outbound phone skillClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge in CXone. Enable screen pops in the skill and assign the skill to the agents who will use PC.
  3. Upload a calling list in CXone or through Proactive XS. Generate your call lists with the Salesforce IDs to enable generating screen pops from a unique external ID rather than through the default ANIClosed Also known as caller ID. Listed phone number of an incoming voice call. query in Salesforce. Alternately, you can also use query variables in your IVRClosed Automated phone menu that allows callers to interact through voice commands, key inputs, or both, to obtain information, route an inbound voice call, or both. script to control what the Salesforce Agent searches for in the query.
  4. Go into Skill Control in CXone and start the PC skill. The agent must opt in to begin PC dialing.

Upload a Custom Ring Tone

The maximum file size you can upload is based on your Salesforce file settings. Generally, the maximum size is between 2MB to 25MB. The larger the file size, the more impact it will have on performance when your agents receive a call. The default ring tones are 3 KB.

  1. Click App Launcher (indicated by a dot grid) and search for Files.

  2. Click Libraries > Asset Library > Upload Asset File.

  3. Click Upload File and select the MP3 file to upload. Click OK.

  4. In the Asset Name field, assign a unique name to the ring tone. In the API Name field, assign a unique name beginning with "Ring". Click Save.
  5. Instruct your agents to select the new ring tone.

Configure Dynamic Data Display for Inbound Calls

Required Permission: Scripts Create permission.

Dynamic data display is only available in the Salesforce Agent Lightning.

Salesforce Agent automatically displays a customer's caller ID, the skill, and a timer when an agent receives an incoming call. With dynamic data display, you can use Studio scripting to display additional customer data to agents receiving incoming calls. You can pull customer data from other applications. Agents will not need to gather that information from the customer.

Dynamic data display will only work for agents who have the inbound skill that you use in the script.

Setting up dynamic data display requires modifying a template script in Studio. The script uses the CustomEvent action, which is found on the Framework tab in Studio. This tab is normally hidden, but if you use dynamic data display, you need the tab to be visible. Enabling this tab can only be done by a CXone Account Representative.

The CustomEvent action has limit of 2048 characters. This means that if the payload array elements contain more characters than that, you must split them up across multiple CustomEvent actions. If you don't split the elements up, the result is invalid JSON and Salesforce Agent displays nothing.

  1. Download the ZIP file containing the template script: IB_Phone_AFSFDynamicData.zip.

  2. Extract the template script from the ZIP file.

  3. In Studio, import the IB_Phone_AFSFDynamicData.xml file.

  4. Save the script in a new folder with a name that identifies the purpose of the script. For example, you could call it IBCustomScript or give it the name of the point of contact.

  5. Configure the Skill property of the Reqagent action with the inbound skill you want to associate with the script.

  6. If you want to add data to pass during events such as OnHold, Onreskill, and Ontransfer, select all of the actions in the script for OnAnswer, then copy and paste them into the script and connect them to the correct event action. If you don't want to use one of the default events that are included in the template script, delete it.

  7. For each branch in your script, customize the data displayed to the agent. If the data you're passing is larger than 2048 characters, follow the steps to add additional CustomEvent actions and finish the script.

    1. Double-click the Set Field Values Snippet action and modify the default global variables to customize the appearance of the text the agent sees. You can override the default for specific fields.

    2. The Snippet code includes a dynamic variable called reqPayloadField. Copy and customize it for each field you want to include. You can add up to ten fields.

      Array of variables for adding fields to the script

      	
      reqPayloadField[1].id="Field1"
      reqPayloadField[1].text="<Your dynamic text goes here>"
      reqPayloadField[1].style.fontSize="{defaultFontSize}"
      reqPayloadField[1].style.fontWeight="{defaultFontWeight}"
      reqPayloadField[1].style.fontStyle="{defaultFontStyle}"
      reqPayloadField[1].style.align="center"
      reqPayloadField[1].style.backgroundColor="#FF0000"
      reqPayloadField[1].style.fontColor="#FFFFFF"	
      
  8. For OnHold, OnReskill, or OnTransfer events, you need to number the fields of the recPayloadField variable according to how you want data passed to the agent. You can:

    • Continue increasing the field numbering from event action to event action. If you choose this option, all of the fields from the previous events are passed to the subsequent events.

    • Restart field numbering with 1 for the next event. Only the fields defined in the Set Field ValuesSnippet actions for that event are passed to the agent.

  9. For every CustomEvent action in the script, verify that the following properties have the specified values. If any of the values are different, the script won't work.

    • TargetAgent{__agentId}

    • EventNameContact_CustomMessages

    • Data{reqPayload}

Add Multiple CustomEvent Actions

If the payload array elements you're passing to Salesforce Agent contain more than 2048 characters, you need to add additional CustomEvent actions and split the elements between them. If you don't, the data is truncated. This results in invalid JSON and Salesforce Agent displays nothing to the agent.

  1. Determine how many CustomEvent actions you need and add them to the script. For example, if the total number of characters you need to pass is 3016, you would need two CustomEvent actions.
  2. Arrange the CustomEvent actions on the right side of the Set Custom Event Payload Snippet action and connect them using the Default branch condition.
  3. Change the Caption property of each CustomEvent action to CustomEvent#, where # is a number that increments sequentially for each additional action. For example, the first action would be CustomEvent1, the second would be CustomEvent2, and so on.
  4. Add one Set Field Values Snippet for each CustomEvent action in the script and then: 

    1. Arrange them next to each other on the left side of the Set Custom Event Payload Snippet action.
    2. Add numbers to the Caption property of each Set Field Values Snippet action, as you did for the CustomEvent actions.
    3. Connect them using the Default branch condition.

    If you added two CustomEvent actions, your script would look like the one in the example image below.

  5. Customize each Set Field Values Snippet action with the data you want it to pass. Ensure that the suffixes and index numbers used in each snippet follow these guidelines:

    • Suffix for reqPayloadField variable—The reqPayloadField variable needs a numeric suffix to identify each set of fields separately. This allows you to assign a set to each of the CustomEvent actions. For example, in the first Set Field Values Snippet, the variable would be reqPayloadField1, and in the second it would be reqPayloadField2, and so on.
    • ID subfield—The ID subfield of the reqPayloadField variable needs to increment consecutively across all Set Field Values Snippet actions. If the first Set Field Values Snippet has eight fields, the first field in the second Set Field Values Snippet starts with id="Field9"
    • Index value of reqPayloadField—The index value of the reqPayloadField arrays must start with 1 in each new Set Field Values Snippet.
    • For example:

      Set Field Values Snippet #1: 
      reqPayloadField1[1].id="Field1"
       ...
      reqPayloadField1[8].id="Field8"
      Set Field Values Snippet #2:
      reqPayloadField2[1].id="Field9"
       ...
      reqPayloadField2[5].id="Field13"

  6. Follow these steps to modify the global variables and format the fields in each Set Field Values Snippet:

    1. Double-click the Set Field Values Snippet action and modify the default global variables to customize the appearance of the text the agent sees. You can override the default for specific fields.

    2. The Snippet code includes a dynamic variable called reqPayloadField. Copy and customize it for each field you want to include. You can add up to ten fields.

      Array of variables for adding fields to the script

      	
      reqPayloadField[1].id="Field1"
      reqPayloadField[1].text="<Your dynamic text goes here>"
      reqPayloadField[1].style.fontSize="{defaultFontSize}"
      reqPayloadField[1].style.fontWeight="{defaultFontWeight}"
      reqPayloadField[1].style.fontStyle="{defaultFontStyle}"
      reqPayloadField[1].style.align="center"
      reqPayloadField[1].style.backgroundColor="#FF0000"
      reqPayloadField[1].style.fontColor="#FFFFFF"	
      
  7. Modify the Set Custom Event Payload Snippet following these steps:

    1. For each CustomEvent action you add, you need one set of these lines of code in the Set Custom Event Payload Snippet:

      
      DYNAMIC payloadJSON
      payloadJSON.contactId = "{contactid}"
      payloadJSON.messages = reqPayloadField
      ASSIGN reqPayload = '{payloadJSON.AsJson()}'
                              

    Modify each set as follows:

    • payloadJSON—This variable needs to be unique for each set of lines you added. Add a numeric suffix to the end of this variable everywhere it appears in each set of lines. Increment it by one for each set of lines you added. For example, set one would be payloadJSON1, set two would be payloadJSON2, and so on.
    • reqPayloadField—In each set of lines, change the name of this variable to match the name of the variable in the corresponding Set Field ValuesSnippet. For example, in the first Set Field ValuesSnippet, this variable is named reqPayloadField1, so in the first set of lines in the Set Custom Event PayloadSnippet, the name of the variable should be reqPayloadField1.
    • reqPayload—In each set of lines, add a suffix to the end of this variable. Increment the suffix to match the other variables in each set of lines. For example, in the first set of lines, this variable would be ReqPayload1.

    For example, if you have two CustomEvent actions, you would have:

    
    DYNAMIC payloadJSON1
    payloadJSON1.contactId = "{contactid}"
    payloadJSON1.messages = reqPayloadField1
    ASSIGN reqPayload1 = '{payloadJSON1.AsJson()}'
    DYNAMIC payloadJSON2
    payloadJSON2.contactId = "{contactid}"
    payloadJSON2.messages = reqPayloadField2
    ASSIGN reqPayload2 = '{payloadJSON2.AsJson()}'
                        

  8. Modify the Data property in each CustomEvent action with the reqPayload# variable that has the same suffix number as the action's Caption. For example, the action captioned CustomEvent1 would use the rePayload1 variable.

  9. Repeat the steps in this task for all of the event actions in your script (OnAnswer, OnHold, OnReskill, OnTransfer). When you perform step 5 to increase the numbering of the ID subfield of the recPayloadField variable, you can:

    • Continue increasing the field numbering from event action to event action. If you choose this option, all of the fields from the previous events are passed to the subsequent events.

    • Restart field numbering with 1 for the next event. Only the fields defined in the Set Field ValuesSnippet actions for that event are passed to the agent.

  10. For every CustomEvent action in the script, verify that the following properties have the specified values. If any of the values are different, the script won't work.

    • TargetAgent{__agentId}

    • EventNameContact_CustomMessages

    • Data{reqPayload#}, where # is a different number in each instance of the action

If you experience issues with importing or saving the scripts, please contact the NICE CXone Implementation Team.