What is the Next Actions API?
The Next Actions API is a REST API that allows you to ask Conversation Orchestrator for the next best actions (route to skill, send a response, etc.) for your bot/app. Accessing the API can be done via a JavaScript method from within a LivePerson Conversation Builder bot or via the REST API for external automations and apps.
When to use the Next Actions API
A typical use case for using the Next Actions API is to get a routing decision to transfer to a skill from a bot or LOB app:
- A brand’s concierge bot (for example, a bot built in Conversation Builder) handles branded greetings, dialogs, and intents.
-
It then calls the Next Actions API, which evaluates all the policies set up in Dynamic Routing and returns the next best action.
- If you're using the Conversation Orchestrator bot template, the ask maven call is already pre-configured for you, and you don’t have to do this.
- If you're using a different Conversation Builder bot, you can use the askMaven JavaScript method.
- If you're using a third-party bot on any external platform (for example, Google Dialogflow), use the REST API.
Please see Dynamic Routing's Getting Started topic for more information.
-
The concierge bot then uses the action (for example, route to a skill) to transfer the conversation to that skill in Conversational Cloud.
This is often used in conjunction with the Conversation Context Service to pass custom attributes to use in a policy (for example, intents).
API versions
v2 of the Conversation Orchestrator APIs was released in July 2021. The new version applies to both the Conversation Context Service and the Next Actions API. v2 has the following additional benefits:
- Higher scalability
- Improved data security through OAuth 2.0 authorization mechanism
- Visibility into Dynamic Routing policy execution logs
- Better APIs i.e. update multiple context variables in a single call
- Better data security through improved encryption
LivePerson is gradually upgrading all accounts from v1 to v2, as the v1 APIs will be deprecated in the future. (Stay tuned for the date!) If you haven’t been contacted yet, but you want to be upgraded to v2 as soon as possible, please contact your LivePerson representative. Please refer to the v1 or v2 documentation as appropriate for your case.
You can know you are on v2 if you see OAuth 2.0 authentication on the API Authorization.
Getting started
See the discussion on generating credentials for using the API.