Is sharing information between intents possible?

The information given by the user will be stored in the “context” object.
For example, we have an entity node(cityName) which takes the city name as input and once the user provides the input, we can use it in any other node by retrieving information. Hence, the same entity values can be reused.

Please refer the below document for further details on the context object usage:

Below are some scenarios wherein the developer would consider passing information to other intents:

  1. Transitioning to the other dialog by adding the dialog as a node in the current dialog flow.
    -> The context of a dialog persists only within the same dialog. So, if the developer is transitioning to the other dialog and would like to pass the context data as collected from the current dialog, access the instance properties of the dialog added and pass the data as needed via the entity pre-assignments.

image

  1. Transitioning to the other dialog by adding the dialog as a sub-intent in the current dialog flow.
    -> When the dialog is added as sub-intent in the current dialog, the context of the current dialog persists and can be accessed at nodes added after the sub-intent.

image

  1. The developer is interrupting Task A with Task B and would need to pass the context as collected at Task A to Task B.
    -> Access the manage interruptions option of Task A and add Task B as a sub intent.
    -> Access the added sub-intent ‘Task B’ and configure pre-assignments as needed to pass the data from Task A to Task B and post-assignments to receive data from the Task B to Task A when Task A is resumed.

image
image
image