Interacting with data

You may need to exchange data with an external system in your dialog application.

Sample scenarios

Your application may want to take into account information about the user’s location from the client’s GPS data, a user’s stored preferences or contacts, or business-specific information such as the user’s bank account balance or flight reservations—it all depends on the type of application you’re building.

For example, consider these use cases.

Coffee application

After asking the user for the type and size of coffee to order, business requirements dictate that the dialog must provide the price of the order before completing the transaction. To get the price and provide it to the customer, the dialog must query an external system.

Order-coffee call flow graphic

Banking application

After collecting all the information necessary to make a payment (the user’s account, the payee, and the payment amount), the dialog is ready to complete the payment. In this use case, the dialog sends the transaction details to the client application, which will then process the payment and provide information back to the dialog, such as a return code and the account new balance.

Pay-bill call flow graphic

Data access node

Exchanging data is done through a data access node in Mix. This node tells the client application that the dialog expects data to continue the flow. It can also be used to exchange information between the client app and the dialog.

Data access nodes allow you to exchange information by:

  • Configuring Mix.dialog so that the dialog service interacts directly with a backend system to exchange data.
  • Exchanging data using the Dialog gRPC API. In this case, variables are exchanged between the dialog service and the client application using the DLGaaS API. For more information, see Data access actions.

You can also send data (variables or entities) to the client application from a Mix.dialog question and answer node. See Set up a question and answer node.

External actions node

Mix.dialog also gives you the ability to handle interactions with external systems using the external actions node. For example, to:

  • End the current conversation, and optionally send information to an external system.
  • Transfer the user to a live agent or another system, optionally exchange information with an external system, and handle follow-up actions if the external system returns information. See Set up an external actions node.

Using dynamic values

Dynamic values provide vocabularies specific to a user during the application session. For example, a banking application might wish to load a list of payees for a bill-payment feature, and make that list specific to each user. After identifying a specific user, an application would retrieve that user’s account information and then build a user-specific vocabulary based on that information. For example, for a pay-bill app to include dynamic entity values such as the names of the bills (payees) that the user might wish to pay, as well as his/her account balances.

For more information, see “Dynamic list entity” (previously at /mix-nlu/#dynamic-list-entities) and “Mark a custom entity as dynamic” (previously at mix-dialog/#mark-a-custom-entity-as-dynamic).