Return result

Return result ends the flow and sends the result back to the agent, which uses it to reply to the customer. Choose how the result is built, optionally store values in contexts, and attach media.

Output type

  • Text: a text you compose, with parameters and variables filled in.

  • JSON: a JSON object you compose, with parameters and variables filled in. Use this when the agent needs several values back.

  • JMESPath expression: one value pulled out of the flow's data. The expression sees every parameter and variable, so reference a variable by name and drill in: weather.body.current. No match gives an empty result; an invalid expression fails the step. See jmespath.org.

Context values cannot be returned as output.

Contexts

Store a variable's value in a context, so agents and other tools can use it for the rest of the conversation. For example, store the email address an API returned, and every agent can use it from then on.

Each row maps a variable to a context. Add a JMESPath expression to a row to store one value from the variable instead of all of it, like customer.email. System context values cannot be set. See Context Variables.

Media

Attach files to the output as extra knowledge for the agent, for example a PDF report generated earlier in the flow.

End Conversation

When on, the conversation ends after this result, and the result is the last message.

  • In a voice conversation, the result is spoken and the call ends.

  • In a chat conversation, the result is the final response. If the customer writes again, a new conversation starts without the previous history.