The A-Z of Webex Contact Center APIs: Address Book
July 17, 2024![Joe Zanini](https://images.contentstack.io/v3/assets/bltd74e2c7e18c68b20/bltc0ffd4350e6f184b/641b44f4db18f61d68e9c4be/JoeZ.jpeg?width=100&height=100&fit=crop)
![The A-Z of Webex Contact Center APIs: Address Book](https://images.contentstack.io/v3/assets/bltd74e2c7e18c68b20/blt8bc0f929f569cca9/6696a0b3ec61e9a7f7bfe542/wxcc-address-book-api-blog-1.png?width=900&height=317&fit=crop)
This is the beginning of a series of blogs called “The A-Z of Webex Contact Center APIs”. In this blog series we will be exploring the entirety of an API and adding context to the effects of executing the API from the perspective of a user. There are two main goals here. First, we want to educate the developer community about what is possible with Webex Contact Center developer tools. Lastly, we want to provoke curiosity amongst Webex developers and expand on the art of possible.
The Webex Contact Center Address Book is a tool available to agents that allows them to select an entry to dial instead of manually entering a phone number when placing a call. Administrators will create an address book and add it to a Desktop Profile that an agent is assigned to. Admins must enable outbound dialing within the dial plan of the desktop profile assigned to an agent that is intended to make outbound calls.
An admin can create an address book from Control Hub. The Control Hub even provides a way for administrators to manage address books in bulk. Below we will go over a way to programmatically manage address books with the Webex Contact Center RESTful APIs.
Managing Address Books In Control Hub
Before we dive into using the API, it is important to know the expected experience and outcomes of creating an Address Book in the Control Hub. Control Hub is the central interface that administrators utilize to manage a Webex organization, manage users, assign service, view analytics and more.
To create an address book in the Control Hub an administrator would navigate to the Contact Center > Desktop Experience > Address Book and click on Create Address Book.
Then the administrator is prompted to fill out a form requiring inputs for the name, a description, Parent Type and Entries for the Address book. The Parent Type defines if the Address Book is available to all sites in an organization, or a specific site in an organization. The Entries are the actual names and phone numbers of contacts in the Address Book.
Once an Address Book is created, it becomes visible in the Address Book section in the Control Hub.
Then we can drill into the Address Book that we created and manage entries.
Administrators can also use the Control Hub to add Address Books to an organization in bulk by following the instructions here.
Using the Address Book API
Getting started with the APIs for the address book will require an Organization ID. The orgId
can be obtained from Control Hub, or an access token obtained via the OAuth 2.0 flow for a Webex Contact Center integration application.
Address Books
The Address Book API supports CRUD (create, read, update and delete) operations so developers and administrators can execute the same functionality we see in the Control Hub, both programmatically and in bulk.
The required parameters in the path and body when executing the Create an Address Book API are Orgid, Name, and Parent Type.
Developers can leverage the Address Book IDs provided in the List Address Books API to do things like, get Address Book details, update an Address Book name, or an update an Address Book description:
- Create Address Book
- Get Address Book by ID
- Update Address Book by ID
- Delete Address Book by ID
- List Address Books
Entries
There is also an associated set of APIs, that supports CRUD operations, for an Address Book’s associated entries that an agent can use to make outbound calls. There is also an API for listing an Address Book’s entries to get the Entry Id. With Entry Id, a developer can get details about a contact in the Address Book and use them in integrations and automations.
The required parameters in the path and body when using the Create an Address Book Entry API are Orgid, Name, and Phone Number.
Developers can leverage the filter, search, and attributes query parameter available in the List Address Book Entry API to do things like, get an entry by ID, lookup an entry by a supported attribute (id,name,number), or filter entries by a search keyword:
- Create Address Book Entry
- Get Address Book Entry by ID
- Update Address Book Entry by ID
- Delete Address Book Entry by ID
- List Address Book Entry
Bulk Operations
Additionally, there is bulk operation support within the API set available to developers and administrators:
Integrations
When registering an integration where the Address Book APIs are intended to be used, be sure to select cjp:config_write
or cjp:config_read
scopes.
Potential Use Case
A potential use case for the Address Book API is when a Webex Contact Center organization administrator would like to synchronize an address with data from a CRM or Directory in an automated fashion. The Bulk Save Address Book Entry API would be the perfect candidate to accomplish this. Look at this sample code to see one way to accomplish this.
Need Some Help? We Got You Covered!
We are excited to provide you with support for these features. If you need help, the Webex Developer Support Team is standing by and happy to assist. You can also start or join a conversation on the Webex for Developers Community Forum.