Configure scripts

Completed

Scripts give representatives ordered guidance while they work with customers. A script can combine instructions that require judgment with macros that automate repeatable actions. This combination supports a consistent process without removing the representative's control over customer interactions.

Design script steps

A script contains one or more ordered steps. Each step uses one of three action types:

Action type Use it for Representative action
Text instruction Approved guidance, questions, or tasks that require judgment. Follow the instruction, and then mark the step as complete.
Macro A configured sequence of automated actions. Run the macro and review the result.
Script A transition to another configured script. Open the target script.

For example, an identity-verification script might contain these steps:

  1. Use a text instruction to present the approved verification questions.
  2. Run a macro that records the verification outcome on the case.
  3. Open a resolution script that matches the customer's request.

Give each step a specific title so the representative understands its outcome before running it. Keep text instructions concise, and use a macro only when its actions are predictable and reversible or otherwise controlled.

Create a script

You need the Productivity tools administrator security role to configure scripts.

  1. In Copilot Service admin center, go to Support experience > Productivity.
  2. For Scripts, select Manage.
  3. Select New.
  4. Enter the script details, and then save the script.
  5. In Script steps, select New Script step.
  6. Configure the step, and then select Save and Close.
  7. Repeat the process for the remaining steps.

The script record includes the following fields:

  • Name: The name shown to administrators and representatives.
  • Unique Name: An identifier in the <prefix>_<name> format. The prefix must contain three through eight alphanumeric characters.
  • Language: A language enabled in Microsoft Dataverse.
  • Description: The purpose and intended use of the script.

For each step, set its name, unique name, order, and action type. Depending on the action type, provide the text instruction, target macro, or target script. Script steps appear to representatives according to the Order value.

Note

Script is the current feature name in Copilot Service admin center. Some existing interfaces and solution components might still use the earlier agent script label.

Associate scripts with sessions

Creating a script doesn't make it available in every session. Associate each script with the session templates where representatives need it.

  1. In Copilot Service admin center, go to Workspaces > Session templates.
  2. Open the applicable session template.
  3. Select the Scripts tab.
  4. In Scripts, select Add Existing script.
  5. Select one or more scripts, and then select Add.
  6. Save the session template.

Session-template associations let you provide different guidance for different work types. For example, a case session can provide a case-resolution script, while a chat session provides conversation-specific verification and closing steps.

Representatives also need scripts enabled in the productivity pane settings of their experience profile. Verify both the session-template association and profile setting when a configured script doesn't appear.

Select a default script by context

A session template can include multiple scripts. Use the script expression builder to select the default script according to session context.

  1. Open the session template, and select Scripts.
  2. Turn on Enable build expression.
  3. Select Build Expression.
  4. Add a condition based on an automation dictionary value.
  5. For each outcome, add the Set default script action and select a script.
  6. Save and close the expression.

For example, an expression can inspect a case category and select either a billing script or a technical-support script. Representatives can still select another available script when the situation requires it.

Test each expression branch with representative records. Confirm that a default script appears, its contextual values resolve, and every macro step produces the expected result.

For more information, see Guide representatives with scripts.