Use Architect prompts in Google Cloud Dialogflow ES bots

You can create and use Architect prompts with Google Cloud Dialogflow ES bots, instead of using text-to-speech. This feature enables you to use established Dialogflow ES prompts by pre-recording them and then storing them in Architect.  

To configure Architect user prompt functionality for your bot, first create a Custom Payload Response in the Google Cloud Dialogflow ES console. After you configure it, the system uses the audio and text from the user prompt instead of Dialogflow ES’s audio and text response for the intent.

Notes:
  • One custom payload can include keys for both barge-in and user prompts.
  • If the system encounters a problem when retrieving the configured prompt, then it uses the audio and text as if it was not previously configured.
  • This feature only supports user prompts, not system prompts.

Enable Architect user prompt functionality for each Google Cloud Dialogflow ES intent

  1. Create a user prompt in Architect.
  2. In the Google Cloud Platform console, go to the Dialogflow Console.
  3. Choose an agent.
  4. Choose Intents in the left sidebar menu.
  5. Choose an intent.
  6. Scroll down to the Responses section.
  7. Click Add Responses and then click Custom Payload.
  8. From the menu that appears, click Custom Payload.
  9. Using the name of the prompt that you created in step 1, use one of the following methods to enable Architect to use prompt functionality:
    • For a single user prompt add this code to the custom payload response:
      {
           "user-prompt": "ArchitectUserPromptName"
      }
    • For multiple user prompts, add this code to the custom payload response:
      {
           "prompts": [
                {"user-prompt": "ArchitectUserPromptName1"},
                {"user-prompt": "ArchitectUserPromptName2"}
           ]
      }
  10. Click Save.