Modify Your Studio Script for Copilot for Agents

This is the third and final step of setting up Copilot for Agents.

You need to create or modify at least one Studio script to set up Copilot for Agents in your contact center. You must add an Agent Assist action to it and assign the Copilot for Agents profile you created previously. The script must be designed to route interactionsClosed The full conversation with an agent through a channel. For example, an interaction can be a voice call, email, chat, or social media conversation. by skillsClosed Used to automate delivery of interactions based on agent skills, abilities, and knowledge. to the agents you want Copilot for Agents to be available for.

Complete each of these tasks in the order given.

Add Actions to Your Script

Required permissions: Studio Script View, Create/Edit

  1. In Studio, open the script you want to use.

  2. Add an Agent Assist action after the ONANSWER or ONASSIGNMENT action.

  3. If you're working with a voice script, add a CONTINUOUS TRANSCRIPTION action immediately after the AGENT ASSIST action. Select your transcription service in this action's wizard. Then configure the following properties:

  4. If you're working with a digital script, add a SNIPPET action before the AGENT ASSIST action. Give this SNIPPET action a Caption of Set AgentID. Copy the following line of code and paste it into the Text View tab of the Editor window.

    ASSIGN global:__AgentId = "{AGENTID}""
  5. To complete the configuration of your script: 

      • Add initialization snippets to the script using Snippet actions. You can do this to customize your agent assist application.
      • Reconfigure the action connectors to ensure proper contact flow and correct any potential errors.
      • Complete any additional scripting and test the script.

Assign a Profile to a Studio Script

Required permissions: Studio Script View, Create/Edit

Use these example scripts for voice and digital.

  1. In Studio, open the script you want to use.
  2. If you're using Desktop Studio, double-click the Agent Assist action to open Agent Assist Hub. If you're using Studio, click open editor on the Agent Assist action.

  3. In the left column, click the checkmark A light gray checkmark inside a light gray circle. next to the agent assist app or profile you want to assign to this script.

    An alternative to using the checkmark is to create a variable in your Studio script. Use the variable to pass the app or profile name into the Assign Launch Config Name property of the AGENT ASSIST action.

  4. Click Close.

Assign Multiple Profiles to a Studio Script

Required permissions: Studio Script View, Create/Edit

You can use Studio variables to assign multiple Copilot for Agents profiles to one Studio script. You then use logic code that determines when each profile is used.

Use these example scripts for voice and digital.

These steps describe a simple example of assigning two Copilot for Agents profiles to one script. Your script might be more complex. Contact CXone Mpower Services for the best design and implementation.

  1. In Studio, open the script you want to use.

  2. If you haven't done so already, add an AGENT ASSIST action to the correct location in your script.

  3. Add a SNIPPET action before the AGENT ASSIST action and connect them.

  4. Double-click the SNIPPET action.

  5. In the Snippet editor window, create three variables. You need two variables to hold the Copilot for Agents profile names, and one variable to hold the name of the profile you want the script to use when it runs.

  6. Underneath those variables, enter logic code that determines when each profile is used. This code changes the value of the profileToUse variable.

  7. Double-click the AGENT ASSIST action to open Agent Assist Hub.

    As of the 25.2 release, Copilot for Agents profiles are no longer configured in Agent Assist Hub. However, the profile settings still appear in Agent Assist Hub. Do not edit them; they do not work. Instead, configure Copilot for Agents profiles in Admin > AI Manager > Copilot for Agents Config. In a future release, the profile settings will be removed from Agent Assist Hub.

  8. For each Copilot for Agents profile you want to use:

    1. Click the profile name in the left column.

    2. Copy the profile name from the General tab.

    3. Paste it into the snippet code you created previously as the value of one of the profile name variables. In the previous example code, the variable names are profile1 and profile2.

  9. Right-click the AGENT ASSIST action. In the assistLaunchConfigName property, enter {profileToUse}. This is the name of the variable that holds the profile you want the script to use, enclosed in curly brackets.

  10. Save your script.

Filter KB Answers by Expert Tags

Required permissions: Studio Script View, Create/Edit

If you've integrated an Expert knowledge base, you can optionally use CXone Mpower Expert tags to filter KB answers. To do this, you can configure two kinds of tag lists:

  • Standard tag list: The Copilot for Agents profile can only access KB articles with the tags in this tag list. It generates KB answers using only those KB articles.

  • Custom tag list: Agents can select tags from a custom tag list to filter KB answers. You can specify up to five custom tag lists per Copilot for Agents profile.

  1. In Studio, open the script you're configuring for Copilot for Agents.

  2. If you haven't already, add an Agent Assist action after ONANSWER or ONASSIGNMENT.

  3. Select the Agent Assist action.

  4. Configure the Agent Assist action's scriptParams property with a list of the Expert tags you want to filter by, in this format:

    
    {
    	"expertTags": {
    		"standard": ["Tag1","Tag2","Tag3","Tag4","Tag5"],
    		"custom": [
    			{
    				"name": "Name of Tag List 1",
    				"type": "Tag",
    				"values":["Tag1","Tag2"],
    				"default":["Tag1"]
    			},
    			{
    				"name": "Name of Tag List 2",
    				"type": "Tag",
    				"values": ["Tag3","Tag4"],
    				"default": ["Tag4"]
    			}
    		]
    	}
    }
    

    Where default is the tag that's automatically selected from the custom tag list. Make sure the names of the tags you enter exactly match the names of the tags in your Expert knowledge base.

  5. Save your script.