Retrieving Bot Playbooks
Bot playbooks are currently available on all paid plans.
To get a list of the currently enabled and active playbooks, use the following endpoint:
GET https://driftapi.com/playbooks/list
This is a Playbook API endpoint
The
playbook_read
scope is required on the Drift app token for access.
Example use cases:
- Mapping playbooks to interaction IDs for reports in external systems such as Google Analytics.
- Understanding the currently active playbooks (as well as goals) in the account.
- Record keeping and auditing for who is updating and creating playbooks.
- Storing a mapping between playbook name and ID for external systems.
Response will be a list of Playbook Model objects.
[
(Playbook Model),
....
]
Example API Call Response
GET https://driftapi.com/playbooks/list
The response will be the list of enabled bot playbooks for the connected org. See the Playbook Model page for more detailed information about each field.
[
{
"goals": [
{
"id": "f4c5112c-bb96-4827-ae72-8a316f0d325e",
"message": "Thanks for chatting with us! Feel free to check out our website if you have other questions"
},
{
"id": "aa6d7ae7-6f86-43be-960f-7db68a0c24f7",
"message": "Put what you want the bot to say to someone who reaches this goal, here."
}
],
"id": 1122498147,
"name": "Target the things once",
"orgId": 123,
"meta": {},
"createdAt": 1568125264250,
"updatedAt": 1568125495515,
"createdAuthorId": 338419,
"updatedAuthorId": 338419,
"interactionId": 305989,
"reportType": "BOOK_MORE_MEETINGS"
},
... // additional playbooks if present
]
This endpoint currently only retrieves enabled and active playbooks
Other disabled, inactive, or archived playbooks in the account are excluded from the response.
For now, ensure the playbooks of interest are enabled in order to retrieve information via the API on them.Disabled playbooks may be included in future versions of the API.
Playbook API responses may be cached
Playbook configuration is more static compared to conversation messages which are broadcasted and updated in real time. There is a 10 minute cache on the playbook responses; returned replies may be at most 10 minutes delayed.
Access to Bot Playbooks Required
If a customer doesn't have bot playbooks (paid plans) enabled or configured in their account, no results may be returned.
Updated about 3 years ago