This article walks you through configuring and utilizing the 8x8 CRM API to block phone numbers specifically for Engage-only tenants.
Prerequisites
Before you begin, download the 8x8 CRM API support documentation. The API allows you to Create, Read, Update, Delete records in the 8x8 Contact Center local CRM.
Applies to
8x8 Engage
Use this guide if you have an Engage-only tenant and want to add or update blocked numbers through the 8x8 CRM API.
Using Contact Center with the built-in CRM and Agent Workspace? See Block Numbers in 8x8 Contact Center.
Using an external CRM? See Block a Number in Contact Center When Using an External CRM.
Procedure
Configure CRM API credentials
To enable API access, you'll need to set up authentication credentials:
Log in to 8x8 Contact Center Configuration Manager with an Admin account;
Navigate to Integration > CRM API;
Check the box for Enable CRM API Access;
Define a username and password for the CRM API;
Review and update the Access Right table according to your requirements.
Create a custom field for blocked numbers
You need to create a dedicated field in the CRM to track blocked numbers:
In Configuration Manager for Contact Center, go to CRM > Fields > Customer Fields.
Click + to add a Customer Field.
For the Data Type, select Pick List.
Enter the following values:
Field Name: BLOCK_NUMBER
Display Label: BLOCK_NUMBER
From the Pick List Values drop-down, select Edit Pick List Values.
Click + Pick List Value. Do this twice for a total of two values.
In the Values column, name the default value NOT_BLOCKED and the second value BLOCKED.
Click Save.
Block numbers via API
Use an API execution tool like Postman to add blocked numbers to your CRM.
Set up your request
Create a new HTTP request in your API tool
Use your VCC environment URL in this format: https://vcc-environment.8x8.com/WAPI/wapi.php.Replace vcc-environment with your actual environment name (e.g., vcc-eu014).
Required fields
When adding a customer with a blocked number, include these mandatory fields according to the 8x8 CRM API Documentation (Add Customer):
“tenant” : “add tenant name”
“username” : “add username”
“password” : “add password”
“command-object” : “Customer”
“command-action” : “Add”
“firstname”: “add first name”
“lastname” : “add last name”
“BLOCK_NUMBER” : “BLOCKED”
Your API request should now successfully create CRM records with the blocked flag set appropriately.
Check the flag in your phone script
Setting the flag on a customer record doesn’t block calls by itself. Your phone script also needs to check this field and hang up when it matches. See the script steps in [Block Numbers in 8x8 Contact Center]. When you select the pick list in the script, choose the BLOCK_NUMBER field and the BLOCKED value.
Update an existing customer to unblock their number
To modify an existing customer record and change the BLOCK_NUMBER custom field value from BLOCKED to NOT_BLOCKED:
List All Customers
First, retrieve a list of all customers to identify the customer you want to unblock:
““tenant” : “add tenant name”
“username” : “add username”
“password” : “add password”
“command-object” : “Customer”
“command-action” : “List”
"accountnum": "%"
Review the response to find the customer ID of the record you want to update.
Update the Customer Record
Once you have identified the customer, update their record with the blocked flag set to NOT_BLOCKED
““tenant” : “add tenant name”
“username” : “add username”
“password” : “add password”
“command-object” : “Customer”
“command-action” : “Modify”
"accountnum": "add accountnum you wish to modify"
“BLOCK_NUMBER” : “NOT_BLOCKED”
Your API request should now successfully create or update CRM records with the blocked flag set appropriately.