HomeVICIdial TutorialsVICIdial Non Agent API TutorialsFetching Lead Callback Data Using lead_callback_info API

Fetching Lead Callback Data Using lead_callback_info API

VICIdial is a leading open-source call center solution, widely used for managing inbound, outbound, and blended campaigns. One of its most valuable features is the ability to schedule and manage lead callbacks, ensuring agents can reconnect with potential customers at the right time.

The lead_callback_info API allows you to retrieve detailed callback data for a specific lead, helping agents and administrators manage follow-ups efficiently.

Why Use the lead_callback_info API?

Retrieve scheduled callback details for a specific lead
Ensure agents have the right follow-up data
Integrate callback information with CRMs or custom dashboards
Automate follow-up workflows to improve call center efficiency

In this tutorial, you will learn:
🔹 What the lead_callback_info API does
🔹 How to configure and authenticate API access
🔹 How to construct and send API requests
🔹 Examples of API calls using a browser, cURL, and Postman
🔹 How to interpret API responses and troubleshoot errors
🔹 Best practices for using the lead_callback_info API efficiently

Let’s dive in! 🚀


Understanding the lead_callback_info API Function

The lead_callback_info API is designed to retrieve callback details for a specific lead, including:

Callback time and date
Agent assigned to the callback
Lead’s status and campaign information
Custom notes left by the agent

Common Use Cases for lead_callback_info API

🔹 Checking if a lead has an active callback scheduled
🔹 Ensuring agents are following up on scheduled calls
🔹 Pulling callback data for CRM or reporting systems
🔹 Tracking callback effectiveness in sales campaigns


Step 1: Prerequisites for Using the API

Before using the lead_callback_info API, ensure you have:

VICIdial installed and configured
An API-enabled user account with the correct permissions
A valid lead ID that has a scheduled callback
VICIdial server access credentials

How to Enable API Access in VICIdial

1️⃣ Log in to the VICIdial Admin Panel
2️⃣ Navigate to Admin > Users
3️⃣ Select the user who will access the API
4️⃣ Set API Access to 1 (Enabled)
5️⃣ Set User Level to 7 or higher**
6️⃣ Add lead_callback_info to the Allowed API Functions (or set to ALL)
7️⃣ Click Save Changes

Now, your user is authorized to retrieve lead callback details using the API.


Step 2: Constructing the API Request

The VICIdial API uses HTTP GET requests, meaning you can access it via a browser, cURL, or API tools like Postman.

Base API URL

arduino
http://your-vicidial-server/vicidial/non_agent_api.php

🔹 Replace your-vicidial-server with your actual VICIdial instance.

Required Parameters for lead_callback_info API

Parameter Description Example
function Specifies the API function (lead_callback_info) lead_callback_info
user VICIdial API username admin
pass VICIdial API password 1234
source Identifier for tracking API calls CRM_Query
lead_id The ID of the lead to retrieve callback data 1001

Step 3: Sending the API Request

Method 1: Fetching Callback Info via a Web Browser

Simply enter the following URL in your browser (replace credentials accordingly):

pgsql
http://your-vicidial-server/vicidial/non_agent_api.php?function=lead_callback_info&user=admin&pass=1234&source=CRM_Query&lead_id=1001

🔹 Press Enter, and the API response should display the callback details.


Method 2: Fetching Callback Info via cURL (Command Line)

For developers, cURL is a convenient tool for making API requests. Use the following command:

bash
curl -X GET "http://your-vicidial-server/vicidial/non_agent_api.php?function=lead_callback_info&user=admin&pass=1234&source=CRM_Query&lead_id=1001"

🔹 This will return the callback details directly in the terminal.


Method 3: Fetching Callback Info via Postman

1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL
4️⃣ Click Send
5️⃣ View the API response in the output panel


Step 4: Understanding API Responses

If the request is successful, VICIdial returns a response containing the callback details:

csharp
1001|John Doe|9876543210|SALE|2024-01-15 10:30:00|Agent123|Campaign1|Follow-up on proposal

Breaking Down the Response

Value Meaning
1001 Lead ID
John Doe Lead Name
9876543210 Phone Number
SALE Lead Status
2024-01-15 10:30:00 Scheduled Callback Date & Time
Agent123 Assigned Agent
Campaign1 Campaign Name
Follow-up on proposal Callback Notes

Step 5: Handling Errors & Troubleshooting

If something goes wrong, VICIdial will return an error message instead of callback details.

Common Errors & Fixes

Error Message Cause Solution
ERROR: USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION Insufficient API permissions Ensure user level is 7+ and API Access is enabled
ERROR: INVALID USERNAME OR PASSWORD Wrong credentials Verify API username and password
ERROR: NO FUNCTION SPECIFIED Missing function parameter Ensure function=lead_callback_info is included
ERROR: NO CALLBACK FOUND FOR THIS LEAD The lead has no scheduled callback Ensure the lead has an active callback

Step 6: Best Practices for Using the lead_callback_info API

Ensure API user has correct permissions to access callback data
Use API responses to build automated follow-up workflows
Store retrieved data in CRMs or reports for better agent performance tracking
Monitor API logs to detect errors and optimize callback retrieval processes
Schedule automated reports to check callback status across multiple leads


Conclusion

The lead_callback_info API function is an essential tool for managing lead callbacks in VICIdial. Whether you need to fetch scheduled callback details, improve agent follow-ups, or integrate callback data with CRMs, this API ensures efficient and accurate callback management.

📌 Key Takeaways

✅ The lead_callback_info API retrieves callback details for leads
✅ Requires an API-enabled user with appropriate permissions
✅ API requests can be made via browser, cURL, or Postman
✅ Common errors are permission and input-related and can be fixed in Admin settings

Feel free to contact us or simply start a live chat to get connected to one of our team members. Here is our contact information.

Calling from US: +1 954-990-0053
Email: office@callix.ai

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Special Offerspot_img

Must Read

spot_img
spot_img
spot_img

Related Articles - Must Read

spot_img