Configure a contact flow for an automated caller interaction
Invoke an automated caller interaction with bots to fulfill the caller's request within the ServiceNow instance.
Before you begin
Role required: sn_cti_core.admin
About this task
When a caller contacts the call center, using the voice or dual-tone multi frequency (DTMF) inputs from caller, a contact flow is invoked in the Amazon Connect instance based on the caller context. The contact flow contains nodes that act as integration points between Amazon services and the ServiceNow instance. Based on the nodes defined in the contact flow, the corresponding operation handlers are triggered in the ServiceNow instance. The caller then gets the response that is defined in the operation handler. For information about contact flows, see the Amazon documentation.
In the ServiceNow base system, a few operation handlers are available by default. For information on operation handlers, see ServiceNow Voice reference.
Procedure
- Optional:
If you do not want to use a default operation handler, create and configure an operation handler in the ServiceNow instance.
- Navigate to ServiceNow Voice - Core > Operation Handlers.
- Click New.
-
On the form, fill in the fields.
Table 1. Operation Handler form Field Description Operation Name Name of the operation that you want to automate. Type Type that specifies how the operation is implemented. - Script: Implementation is included in a script.
- Forward to Handler: Request is forwarded to an operation handler, which is invoked by lookup on the sys_id of that handler. This scenario is possible when you have different intents for similar operations, for example, Create an HR incident and Create incident.
- Forward to Operation: Request is forwarded to an operation handler, which is invoked by lookup on the name of the handler and then name resolution to find the handler.
- Integration Hub - Action: Calls an Integration Hub action.
- Integration Hub - Subflow: Calls an Integration Hub flow or subflow.
Application Application associated with the operation handler. Domain Domain associated with the operation handler. Active Option to activate the operation handler. Require Authentication Option to enable authentication for the operation handler. Note:If this option is selected, the corresponding operation is invoked only when a valid authentication token is passed in the request. It is supported by an authentication operation handler that supports pin-based authentication, which can be leveraged in your contact flows. For information about configuring the PIN, see Configuring a phone PIN.Description Summary about the operation handler. Script Script that contains the operation implementation and the response for the caller. This field appears when Script is selected for Type. Forward To Operation handler to which you want to forward the request. This field appears when Forward to Handler or Forward to Operation is selected for Type. Integration Hub - Action Integration Hub action that you want to call to complete the request. This field appears when Integration Hub - Action is selected for Type.
Integration Hub - Flow/SubFlow Integration Hub flow or subflow that you want to call to complete the request. This field appears when Integration Hub - Subflow is selected for Type.
- Click Submit.
-
Create a contact flow in Amazon Connect to define an end-to-end customer experience.
For information about creating a contact flow, see the Amazon documentation.
When building a contact flow within Amazon Connect, use any of these nodes to trigger operation handlers defined in the ServiceNow instance. These nodes act as integration points between Amazon services and the ServiceNow instance.
Table 2. Nodes in contact flows Node Description Configuration Get Customer Input Invokes a Lex Bot. The operation handler that is triggered is based on the name of the intent associated with the Lex Bot. For information about this node, see the Amazon documentation. Note:This node can be used when the integration is between Amazon Lex and the ServiceNow instance.- Create an intent for the required Lex Bot in your Amazon Connect instance. For information about creating an intent, see the Amazon documentation.
- Specify the following information in the intent.
- Intent name: Name of the intent.Note:This intent name should match an operation handler in the ServiceNow instance with the same name, or name + ‘_<suffix>’ where suffix can contain any five uppercase alpha characters.
- Sample utterances: Caller utterances that trigger the operation handler.
- Lambda initialization and validation: If the operation handler being invoked requires authentication, select the Initialization and validation code hook check box and select the deployed AWS Lambda function.
- Lambda function: Deployed AWS Lambda function that is invoked.
- Intent name: Name of the intent.
- Save, build, and publish the intent.
- Open the required contact flow in the contact flow designer in your Amazon Connect instance.
- Click the Get Customer Input node and specify the Lex Bot details in the Amazon Lex section.
- Click Save.
Invoke AWS Lambda Function Invokes an AWS Lambda function. The operation handler that is triggered is based on the sn_operation parameter set on the node in the contact flow. For information about this node, see the Amazon documentation. Note:This node can be used to for data dips (for example, authorizing a caller) where the integration is between the call center and the ServiceNow instance. The data dip configuration allows a caller to enter information, such as an account number, to route calls to a particular queue. Using this number, you can look up the first name of the caller and create an interaction record after the call is initiated. Also, you can customize the greeting with the caller name later in the flow.- Open the required contact flow in the contact flow designer in your Amazon Connect instance.
- Click the Invoke AWS Lambda Function node and specify the following input parameters.
- Destination key: sn_component, Value: Component from where the Lambda function is invoked. For example, sn_aws_connect_lambda_proxy_component.
- Destination key: sn_operation, Value: Name of the operation handler that you want to invoke. For example, interactionEvent.
- (optional) Destination key: queueName, Value: Name of the queue that you want to transfer the flow to.Note:This parameter is used to invoke the workItemEvent operation handler.
- (optional) Destination key: queueId, Value: ARN of the queue that you want to transfer the flow to.Note:This parameter is used to invoke the workItemEvent operation handler.
- (optional) Destination key: authToken, Value: AuthToken received via authentication call. This parameter is required for invoking an operation handler that requires authentication.
- (optional) Destination key: interactionId, Value: Interaction ID received via interactionEvent call.
- Click Save.
-
Ensure that a caller’s phone number is associated with the contact flow after it is created and published.
This process ensures that each time the caller calls, the corresponding contact flow is invoked. For information about associating a phone number with a contact flow, see the Amazon documentation.
Note:For a sample implementation of invoking operation handlers in a contact flow, you can refer to the default contact flows. For information on default contact flows, see Components installed with ServiceNow Voice for ITSM and Components installed with ServiceNow Voice for CSM.