Dynamic prompts

By default, prompt expansion happens at the beginning of the conversation, as part of agent’s initialization.

Alternatively, you can use dynamic_prompt advanced configuration variable to re-generate prompt for specific agent dynamically, on each user utterance.

{
    "dynamic_prompt": true
}

When dynamic prompts are enabled, you can turn use Turn data variables, as described in Turn data.

The following example demonstrates the use of dynamic prompts in an outbound dialer agent to ensure that the call is answered by a real human, and not IVR’s or an answering machine.

{{#if ("your call is important" in user_utterance or
       "stay on the line" in user_utterance or
       "wait while we connect" in user_utterance or
       "NO-USER-INPUT" in user_utterance)}}
    {{#if duration < 40}}
        Say "Waiting for human to join"
    {{#else}}
        End the call
    {{/if}}
{{#else}}
    Introduce yourself.
    Inform user that his car was evacuated.
    ...
{{/if}}