Water Mark
Jul 23, 2018 | view(s) | people thought this was helpful

Use Context Service Fields in Dialogflow

If your organization is currently using Context Service, you can use the Context Service base customer fields in a Dialogflow agent. If you do not have Context Service enabled yet, see Enable Context Service for Your Organization. Using the Context Service base customer fields in a Dialogflow agent allows you to:

  • Build a personalized chat experience by using customer information that is stored in Context Service.

  • Build a streamlined chat experience by using information that is stored in Context Service and Dialogflow contexts to determine when to trigger certain Dialogflow intents.

To add the Context Service base customer fields to your Dialogflow agent:

  1. Go to Cisco Webex Control Hub and Create a New Customer Virtual Assistant, or Edit an Existing Customer Virtual Assistant.

  2. Map the Context Service base customer fields to Dialogflow parameters:

    1. Search for a Context Service field using the search bar.

    2. Select a Context Service field from the search results.

    3. Enter a parameter name to map the Context Service field to a Dialogflow parameter in the SPARKCARE_CONTEXT_SERVICE_FIELDS context. The parameter name cannot exceed 50 characters and cannot contain special characters. The special character exceptions are periods (.), dashes (-), and underscores (_).

        

      Care automatically adds your chosen parameters to the SPARKCARE_CONTEXT_SERVICE_FIELDS Dialogflow context. Because the SPARKCARE_CONTEXT_SERVICE_FIELDS context is always available in Dialogflow, you cannot use the presence of the context to determine when Context Service information is available.

To begin using Context Service field information, create a new parameter in Dialogflow and reference the parameter that you created in Cisco Webex Control Hub as the value. Passing the Context Service field information to a new parameter allows you to mark the parameter as required and provide a prompt to customers when information is not available.

  1. Create a new parameter in Dialogflow.

  2. Pass the Context Service field information to the new parameter by entering #SPARKCARE_CONTEXT_SERVICE_FIELDS.<your-chosen-parameter-name-in-Webex-Control-Hub> as the parameter value.

  3. Begin using the new parameter by referencing it in the Responses section.

For more information, see the Dialogflow Parameters documentation.

Was this article helpful?

Related Articles

Recently Viewed

×