Default input and output rich controls for a custom chat integration
Summarize
Summary of Default input and output rich controls for a custom chat integration
This content explains how to map default input and output rich controls to a custom chat integration in ServiceNow using theCustom Adapter Configurations [syscscustomadapterconfig]table. Proper mapping and transformer implementation are essential to ensure smooth chat responses and a positive end-user experience. The controls correspond to theuiTypeparameter used in Virtual Agent Designer to build conversations.
Show less
Key Features
- ActionRichControl: Manages various conversation events and actions. It wraps multiple action message types (e.g., StartSpinnerActionMsg, SwitchToVirtualAgentActionMsg) into a single outbound transformer, simplifying integration. No inbound transformer is needed for this control. If sent from a live agent, it includes an agentInfo attribute.
- DefaultPicker: Supports File Picker, Topic Picker, and Boolean controls. It allows configuration of options with labels, values, descriptions, attachments, and enablement status. An order parameter can prioritize displayed topics.
- DefaultText: Maps Input Text, Output Text, and File Upload controls. It supports properties like requirement status, text recognition (nluTextEnabled), input masking (e.g., SECURE, SENSITIVE), and labeling.
- DefaultDate: Supports Date, DateTime, and Time input controls with similar configuration options.
- DefaultOutputLink: Defines link response controls with customizable label, header, type, and action URL.
- DefaultOutputImage: Manages image response controls by specifying the image URL.
- DefaultOutputCard: Supports card-style response controls, including template name and JSON data string.
- DefaultOutputHtml: Enables HTML content responses with configurable style, size, and HTML code.
- DefaultOutputTable: Provides table response controls with headers, navigation button labels, and data arrays.
- DefaultGroupedPartsOutputControl: Handles multi-response controls grouping multiple links or items with headers and contextual information.
- DefaultMultiPartOutput: Supports multi-part responses containing embedded controls such as HTML content, with navigation controls.
- DefaultCustomControl: Allows integration of user-defined custom controls with properties for naming, requirement, UX component IDs, input/output designation, and serialized JSON data.
Practical Implications for ServiceNow Customers
Mapping these default rich controls correctly in your custom chat adapter ensures that your chat integration can handle a wide variety of conversation elements, from simple text and date inputs to complex multi-part and custom controls. It guarantees that users will receive appropriate responses and interactive elements tailored to the channel's capabilities. Implementing outbound transformers for these controls ensures that responses are served effectively, enhancing the chat experience. Live agent interactions carry additional metadata, enabling better context handling.
By understanding and utilizing these default controls, ServiceNow customers can efficiently build, customize, and extend their Virtual Agent chat experiences to fit their specific business needs and communication channels.
Input and output rich controls must be mapped to your custom chat integration in the Custom Adapter Configurations [sys_cs_custom_adapter_config] table. If a rich control is missing an outbound transformer implementation, a response is not served to the end user and that user may get an unsatisfactory chat experience.
The following default rich controls map to input and output rich controls. The uiType parameter refers to a topic control used to build conversations in Virtual Agent Designer.
| Rich control | Description |
|---|---|
| ActionRichControl | This component handles the different events and actions that occur in a
conversation. Some actions may not apply to all channels. For example,
StartSpinnerActionMsg is ignored in SMS. ServiceNow® Virtual Agent produces the following types of action messages through this framework. The custom chat interface only recognizes certain action message types.
ActionRichControl wraps these messages inside the actionMsg element. So, a single outbound transformer for ActionRichControl can handle all of these messages. There is no need for an inbound transformer for this component. |
| agentInfo parameter | If the rich control is sent from a live agent, then the
agentInfo attribute is added to the rich
control. Example: |
| DefaultPicker | Maps to File Picker, Topic Picker,
and Boolean
controls. Example:
The optional order parameter lets you specify the order in which promoted topics should display. For example: |
| DefaultText | Maps to Input Text, Output Text, and File Upload
controls. Example: |
| DefaultDate | Maps to Date and Time controls. |
| DefaultOutputLink | Maps to link response
controls. Example: |
| DefaultOutputImage | Maps to image response
controls. Example: |
| DefaultOutputCard | Maps to card response
controls. Example: |
| DefaultOutputHtml | Maps to HTML response
controls. Example: |
| DefaultOutputTable | Maps to table response
controls. Example: |
| DefaultGroupedPartsOutputControl | Maps to multi-response
controls. Example: |
| DefaultMultiPartOutput | Maps to multi-response
controls. Example: |
| DefaultCustomControl | Maps to custom
controls. Example: |