During a virtual agent interaction, you might need to capture the CRM record ID to manage webhooks to the CRM. This page explains how to do that.
Before you begin
Before you can assign chat or call records to a default user, you need to set a default user for your CRM. For more information, see CRM default administrator user.
Configure the assignment of chat or call records created by a virtual agent
To configure the assignment of chat or call records created by a virtual agent, follow these steps:
- In the (CCAI Platform) portal, click Settings > Operation Management. If you don't see the settings menu, click Menu, and then click Settings > Operation Management.
- Go to the Virtual Agent > Customer support agents pane.
- To assign call records, under Calls, select one of the following options. Some options are not available with some CRM types.
- Assign to a default user. Call records created by a virtual agent are assigned to the default user. If this setting appears but is inactive, set the default user for your CRM to activate the setting. For more information, see CRM default administrator user.
- Leave unassigned. Call records created by a virtual agent are left unassigned.
- Assign to a specific user. Call records created by a virtual agent are assigned to a user that you specify. If you select this option, enter a user ID, and then click Validate.
- To assign chat records, under Chats, select one of the following options. Some options are not available with some CRM types.
- Assign to a default user. Chat records created by a virtual agent are assigned to the default user. If this setting appears but is inactive, set the default user for your CRM to activate the setting. For more information, see CRM default administrator user.
- Leave unassigned. Chat records created by a virtual agent are left unassigned.
- Assign to a specific user. Chat records created by a virtual agent are assigned to a user that you specify. If you select this option, enter a user ID, and then click Validate.
- Click Save Changes.
Create a webhook
To create a webhook, follow these steps:
- In Dialogflow CX, create a flexible webhook with a method type of
GET. For more information, see Flexible webhooks. In the webhook URL, enter the following:
https://YOUR_CCAAS_HOST/manager/api/v1/$session.params.channel?id[]=$session.params.idIn the webhook response configuration, map your selected Dialogflow CX parameter to the
[0].out_ticket_idfield path.Place the webhook in your virtual agent in a position where you need to retrieve the record ID.
Google recommends that you don't put this webhook on your initial start page. This could cause increased latency in creating the ticket.
Pass data parameters
When assigning the virtual agent to a queue, set up the following parameters to be sent:
- From session metadata, set parameter
idto Call ID for IVR queues or Chat ID for chat queues. - Set parameter
channelto the fixed value"calls"for IVR queues or"chats"for chat queues. Alternatively, you can omit thechannelparameter and use separate webhooks for calls and chats.
For more information on passing data parameters, see Pass data parameters.