In modern call centers, personalized customer interactions enhance customer satisfaction and retention. By integrating VICIdial’s sounds_list API with CRM software (Salesforce, HubSpot, Zoho CRM, etc.), businesses can dynamically select and play IVR prompts based on customer profile data.
This guide provides a step-by-step tutorial to integrate the VICIdial API with a CRM system for automated, personalized IVR greetings and menu prompts.
Understanding the VICIdial sounds_list API
The sounds_list API retrieves available audio files stored in the VICIdial system. These files can be used for IVR messages, hold music, voicemail recordings, and custom prompts.
API Endpoint
http://your-vicidial-server/vicidial/non_agent_api.php?function=sounds_list
Required Parameters
Parameter | Type | Description |
---|---|---|
source |
String | API request identifier (e.g., “crm-integration”) |
user |
String | VICIdial user with API access |
pass |
String | VICIdial user password |
function |
String | Must be sounds_list |
Optional Parameters
Parameter | Type | Description |
---|---|---|
format |
String | Output format (tab , link , selectframe ) |
stage |
String | Sorting option (date , size , name ) |
comments |
String | Name of the field to populate |
Step 1: Fetching Available Audio Files from VICIdial
To retrieve a list of IVR prompts:
Example API Request
http://your-vicidial-server/vicidial/non_agent_api.php?
source=crm-integration&user=admin&pass=1234&function=sounds_list&format=tab&stage=name
Example API Response
SUCCESS
welcome_message.wav
premium_customer_greeting.wav
standard_greeting.wav
special_offer.wav
Step 2: Connecting VICIdial API with CRM
1. Extract Customer Data from CRM
- When a customer calls, the CRM fetches customer details (name, membership level, purchase history, etc.).
- Example CRM API request (for Zoho CRM):
GET https://www.zohoapis.com/crm/v2/Contacts/{customer_phone_number}
- Example Response:
{
"data": [
{
"Full_Name": "John Doe",
"Membership_Level": "Premium",
"Last_Purchase": "2024-01-15"
}
]
}
2. Map CRM Data to IVR Prompts
Use CRM attributes to determine the appropriate audio file:
Customer Type | IVR Prompt |
---|---|
Premium Customer | premium_customer_greeting.wav |
Standard Customer | standard_greeting.wav |
New Customer | welcome_message.wav |
Promotional Campaign | special_offer.wav |
Step 3: Automating IVR Greeting Selection
A script can automatically select the right greeting based on customer data.
Example Python Script (Fetching CRM Data & Playing IVR Prompt)
import requests
# VICIdial API Endpoint
vicidial_api = "http://your-vicidial-server/vicidial/non_agent_api.php"
# CRM API Endpoint
crm_api = "https://www.zohoapis.com/crm/v2/Contacts/{customer_phone_number}"
# VICIdial Credentials
params = {
"source": "crm-integration",
"user": "admin",
"pass": "1234",
"function": "sounds_list",
"format": "tab"
}
# Fetch available audio files from VICIdial
response = requests.get(vicidial_api, params=params)
sound_files = response.text.split('\n')[1:]
# Fetch customer data from CRM
crm_response = requests.get(crm_api)
customer_data = crm_response.json()["data"][0]
# Determine correct IVR prompt based on CRM data
customer_type = customer_data.get("Membership_Level", "Standard")
audio_mapping = {
"Premium": "premium_customer_greeting.wav",
"Standard": "standard_greeting.wav",
"New": "welcome_message.wav"
}
selected_prompt = audio_mapping.get(customer_type, "standard_greeting.wav")
if selected_prompt in sound_files:
print(f"Play IVR Prompt: {selected_prompt}")
else:
print("Default IVR Prompt")
Step 4: Deploying the Integration
1. Setup a Middleware Server
- A server-side script (Python, Node.js, PHP) can handle API calls.
- The script should:
- Listen for incoming calls.
- Fetch customer data from CRM.
- Retrieve available IVR prompts from VICIdial.
- Dynamically play the correct greeting.
2. Configuring the VICIdial IVR System
- Update IVR routing rules in VICIdial to fetch external prompts.
- Example VICIdial Call Menu Configuration:
- Press 1: Premium Support (
premium_customer_greeting.wav
) - Press 2: General Support (
standard_greeting.wav
) - Press 3: Special Offers (
special_offer.wav
)
- Press 1: Premium Support (
3. Automating Voice Response with Webhooks
- Some CRMs support webhooks to trigger the integration automatically.
- Example Zoho CRM Webhook Setup:
- Trigger: Incoming Call Detected
- Webhook URL:
http://your-server/ivr-selection
- Method:
GET
- Parameters: Customer Phone Number
Conclusion
By integrating VICIdial’s sounds_list API with CRM software, businesses can: ✅ Personalize IVR greetings based on customer data.
✅ Improve customer experience and engagement.
✅ Automate call flows for efficiency.
This integration helps call centers streamline interactions, reduce wait times, and increase customer satisfaction. Ready to implement? Contact us for expert VICIdial API integrations!
FAQs
1. What if a customer profile doesn’t match any IVR prompt?
A default prompt (e.g., standard_greeting.wav
) should be played.
2. Can this integration work with multiple CRMs?
Yes, APIs from Salesforce, HubSpot, and Zoho CRM work similarly.
3. Does this integration require a dedicated server?
No, it can be hosted on a cloud server or an on-premise middleware application.
4. Can this be used for outbound call personalization?
Yes! The same logic can be applied for outbound IVR calls.
5. Is this integration secure?
Yes, ensure API credentials are encrypted and use HTTPS for secure communication.