Agent Scripting (Hosted Control)
Use Agent Scripting type of hosted control to define a call script that provides instructions to the call center agent to guide them during a customer interaction for a given session. For more information, see Guide customer interactions with agent scripts.
Create an Agent Scripting hosted control
While creating a new hosted control, the fields in the New Hosted Control screen vary based on the type of hosted control you want to create. This section provides information about the specific fields that are unique to the Agent Scripting hosted control type. For detailed information about creating a hosted control, see Create or edit a hosted control.
In the New Hosted Control screen, under the Unified Service Desk area, select Agent Scripting from the Unified Service Desk Component Type drop-down list. The WorkflowPanel is the most common panel for this hosted control type, and the same is displayed in the Display Group field. For information about various panels available in Unified Service Desk, see Panels, panel types, and panel layouts in Unified Service Desk. For information about other General fields, see Create or edit a hosted control.
Predefined UII actions
The following actions are supported for this type of hosted control.
Return to the previous step in the history.
This action is used to close the hosted control.
Fires a user-defined event from this hosted control.
|name||Name of the user-defined event.|
All subsequent name=value pairs become the parameters to the event. For more information about creating a user-defined event, see Create a user-defined event.
This action displays the specified agent task. The available agent task names can be seen in the Agent Scripts section in the Common Data Service platform (Settings > Agent Scripts).
|Specify the name of the agent task to display in the Data field.|
This action is deprecated. Use the GoToTask action.
This action is deprecated. Use the GoToTask action.
This action is used to move hosted controls between panels at runtime.
|app||Name of the hosted control to be moved.|
|panel||Target panel for the hosted control.|
Creates a page for creating a new Common Data Service platform record of the entity specified, and treats the page as a popup from the specified hosted control. The window navigation rules are evaluated to determine the location where the page to create the entity record is displayed.
|LogicalName||The logical name of the entity for creating a new instance.|
The rest of the parameters should consist of name=value pairs. These are the additional pre-populated values in the form for creating a new record for the specified entity. For more information about using this action, see step 4 in Walkthrough 7: Configure agent scripting in your agent application.
Opens an existing instance of the entity specified and identified by the ID, and treats the page as a popup from the specified hosted control. The window navigation rules are evaluated to determine the location where the popup should be displayed.
|LogicalName||The logical name of the entity to open.|
|id||The ID of the entity record to open.|
Pops up a URL from the hosted control and runs the window navigation rules against it for routing the popup to the appropriate location.
|url||Routes a popup from this hosted control using this URL as if it were a popup requested from the displayed control.|
|frame||The frame from which this popup originated.|
Displays the hosted control at the specified location on a monitor. You can display hosted control on up to two monitors. This action is applicable for hosted control instances that are configured to be placed on a USDFloatingPanel or USDFloatingToolPanel panel type.
|screen||Specifies the screen on which to display the hosted control. Valid values are 1 or 2. If you don’t specify this parameter, 1 is passed by default.|
|left||Specifies the position, in percentage, from the left of the screen on the target monitor where the hosted control should be displayed. Valid values are 0 through 100. If you don’t specify this parameter, 0 is passed by default.|
|top||Specifies the position, in percentage, from the top of the screen on the target monitor where the hosted control should be displayed. Valid values are 0 through 100. If you don’t specify this parameter, 0 is passed by default.|
|width||Specifies the width, in percentage, of the hosted control window on the target monitor. Valid values are 1 through 100. If you don’t specify this parameter, 100 is passed by default.|
|height||Specifies the height, in percentage, of the hosted control window on the target monitor. Valid values are 1 through 100. If you don’t specify this parameter, 100 is passed by default.|
This action explicitly sets the width and height of the hosted control. This is particularly useful when using "auto" in your panel layouts.
|width||The width of the hosted control.|
|height||The height of the hosted control.|
This action displays the Send button on the agent script in the client application. This button is typically used for chat sessions, and when the user clicks the button, the SendClicked event is fired, which is used to write the script text to the chat window.
The following predefined events are associated with this hosted control type.
Occurs when all answers for the current task have been clicked. This is useful for checklists. Basically each answer points back to the same task. So when you click the buttons, they will display check boxes next to them. Once all are checked, this event is fired.
|task||Name of the task for which all the answers have been clicked.|
|id||ID of the task for which all the answers have been clicked.|
Occurs when the Send button on the agent script in the client application is clicked. To display the Send Button, you should call the ShowSendButton action.
Occurs each time an agent script is reached, whether by the user clicking an answer, or by some component calling one of the actions on this hosted control.
|task||Name of the agent script task that was reached. For the main menu, which isn't a listed task in the configuration of agent scripts, an event is fired with this parameter set to "[Main Menu]".|
Guide customer interactions with agent scripts Configure and manage agent scripts UII actions Events View predefined actions and events for a hosted control View embedded help for actions and events Walkthrough 7: Configure agent scripting in your agent application Hosted control types and action/event reference Administration Guide for Unified Service Desk for Microsoft Dynamics CRM