Intro to agent scripting in RingCX
==================================

Agent scripting is a powerful tool for your agents that functions like a script in a movie or play. With a well-built script, agents are guided smoothly through interactions with leads and customers.

Scripts can be used to share, collect, update, and save information using behind-the-scenes APIs, custom JavaScript, and web service tools. You can incorporate a variety of elements into your scripts, including web service tools that fetch and post data to and from external websites, commands that stop and start call recordings, and iFramed websites loaded directly into the script.

Any business that needs to standardize its communications for legal or business reasons can benefit from agent scripting. This tool helps companies provide consistent service and carefully tailored interactions.

Note: Agent scripting is currently only available for calls.

Legal compliance
----------------

Some companies in highly regulated sectors are required by law to share certain information with customers using specific wording at specific times during a call or chat. These companies can use agent scripting tools like the knowledge base to ensure agents can repeat the necessary language verbatim, whether it's read verbally during a phone call or sent to the customer in a chat.

Customer service
----------------

Some companies may prefer to record calls to improve their customer service. You can use the script to instruct agents when to stop and start recording manually, or you can build the action into the script so it activates or deactivates automatically.

For example, you may need to pause recording while sensitive information is collected, such as a credit card number or personal health information, then resume recording after that part of the interaction.

Using agent scripts during an interaction
-----------------------------------------

Agents use scripts assigned to their queue or campaign during or after a call.

The script associated with the queue or campaign the agent is in will automatically appear on the screen at the start of the interaction, and any information shared, recorded, or reported can be automatically saved

![](https://assets.ringcentral.com/content/dam/xml-assets/doc_team/en_us/ringcentral/RingCX/Intro-to-agent-scripting/topics/media/1-agent-script.png)

Viewing agent scripts
---------------------

When an agent isn't handling an interaction, they can click Scripts in the left navigation panel to view and study the scripts available to them.

A list of available scripts will appear in the left-hand panel, and the selected script will display in the right-hand panel. Note that scripts accessed from the left panel are for study purposes only and will not collect or save information unless the agent is on an active call or live chat.

![](https://assets.ringcentral.com/content/dam/xml-assets/doc_team/en_us/ringcentral/RingCX/Intro-to-agent-scripting/topics/media/2-agent-scripts-final.png)

While you can create basic scripts easily using drag-and-drop technology, Script Designer also offers a variety of tools to delve into more complex agent scripting elements.

You may also want to create a knowledge base for agents to use during calls. A knowledge base is a collection of searchable preconfigured text selections (or "canned responses") that agents can quickly access and insert into scripts.

For step-by-step instructions for creating an agent script, visit [Creating an agent script in RingCX](https://support.ringcentral.com/article-v2/Creating-a-script.html?brand=RingCentral&product=RingCX&language=en_US#GUID-2d5240db-a22e-467e-bb92-9941d3017024-en_us "").

Using advanced features in Script Designer
------------------------------------------

Here are some of the powerful features you can use to enhance your scripts:

* **Customization**: Because your scripts are customizable, you can add your own logos and colors, choose different fonts and sizes, insert your own photos and GIFs, and more.
* **Embed external web applications with iFrame**: Use the iFrame element to embed entire websites into your scripts, allowing agents to collect or enter information without leaving the page.
* **Web service integration**: Use web service calls to access external websites and databases, retrieve information in real time, and present it to agents. You can also update external systems by depositing information in real time.
* **Conditional actions**: Conditional actions let agents provide seamless service, even when interactions don't go as planned. Add radio buttons and checkboxes that agents can select according to customer answers, then create a conditional clause that triggers different workflows and options.
* **Call controls**: Insert call controls like Hold and Transfer into scripts so agents can manage active calls without leaving the page.

