Interactions are enneo’s main method of giving structured feedback to agents.
A interaction consists of four parts:
- Infos: What messages/alerts should be shown to the agent?
- Form: What input fields, e.g. textareas or dropdown fields, should be shown?
- Data: What are the values of each input form field?
- Options: What buttons should be shown to the user?
How to create an interaction using the SDK
For this, you can use the enneo SDK, a library of object defintions. The interaction above can be created using this code:
‣
‣
‣
Note that the enneo SDK requires environment variables to be set indicating the API URL of enneo, and a session token for authorization. If you use a source code executor, these environment variables will be injected at runtime and you don’t need to worry about them. If you include the SDK in your own web service, you’ll need to set
ENNEO_API_URL
to https://instance-name.enneo.ai and ENNEO_SESSION_TOKEN
to a service worker token as described in the authorization documentation.How to create an interaction manually
Instead of the SDK, you can also create the JSON object for the interaction directly.
Here is a full example for the interaction for the termination AI function shown above.
The example below also specifies the form property. If this is omitted, enneo will auto-generate the forms based on your input parameter definition.
‣