HomeVICIdial TutorialsVICIdial Non Agent API TutorialsAdding or Updating Alternative Call Disposition URLs Using update_alt_url API in VICIdial

Adding or Updating Alternative Call Disposition URLs Using update_alt_url API in VICIdial

Call dispositions are an essential component of call center operations, helping agents and managers track call outcomes effectively. In VICIdial, Alternative Call Disposition URLs (Alt URLs) allow administrators to redirect agents to a custom webpage after they select a disposition, enabling seamless integration with CRMs, third-party databases, or follow-up workflows.

Instead of manually updating Alt URLs via the VICIdial Admin Panel, the update_alt_url API allows for dynamic modifications and automation, ensuring that agents always see the correct URL associated with each call disposition.

Why Use the update_alt_url API?

Dynamically modify Alt URLs without manual intervention
Ensure agents are redirected to the correct follow-up page
Integrate with CRMs, order management systems, and ticketing tools
Improve post-call workflows by guiding agents to specific pages
Automate Alt URL updates for different campaigns and call types

In this tutorial, we’ll cover:
🔹 How the update_alt_url API works
🔹 How to configure and authenticate API access
🔹 How to construct and send API requests
🔹 Examples using a browser, cURL, and Postman
🔹 How to interpret API responses and troubleshoot errors
🔹 Best practices for using the update_alt_url API efficiently

Let’s get started! 🚀


Understanding the update_alt_url API Function

The update_alt_url API allows administrators to add, update, or delete Alternative Call Disposition URLs dynamically. These URLs redirect agents to specific web pages based on the disposition selected after a call.

What Can Be Updated Using update_alt_url API?

Campaign ID – The campaign where the Alt URL is applied
Disposition Code – The call outcome associated with the Alt URL (e.g., SALE, CALLBK)
Alt URL – The web address that agents will be redirected to
Active Status – Enable (Y) or disable (N) an Alt URL
Delete URL – Remove an Alt URL from a campaign

Common Use Cases for update_alt_url API

🔹 Redirecting agents to a CRM for lead updates after a sale
🔹 Sending agents to an order form when a customer confirms a purchase
🔹 Guiding agents to a ticketing system after logging a support request
🔹 Providing a custom feedback form for certain call dispositions
🔹 Removing outdated Alt URLs and ensuring workflow consistency


Step 1: Prerequisites for Using the API

Before using the update_alt_url API, ensure you have:

VICIdial installed and configured
An API-enabled user account with administrative permissions**
A valid campaign ID where Alt URLs need to be modified
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 8 or higher** (Admin-level access) 6️⃣ Add update_alt_urlto the **Allowed API Functions** (or set toALL`)
7️⃣ Click Save Changes

Now, your user is authorized to modify Alternative Call Disposition URLs dynamically 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 update_alt_url API

Parameter Description Example
function Specifies the API function (update_alt_url) update_alt_url
user VICIdial API username admin
pass VICIdial API password 1234
source Identifier for tracking API calls AltURLUpdate
campaign_id The campaign where the Alt URL applies SALES_CAMPAIGN
dispo_code The call disposition linked to the Alt URL SALE
alt_url The URL agents are redirected to https://crm.yoursite.com/update_lead
active Enable (Y) or disable (N) the Alt URL Y
delete_url (Optional) Delete the Alt URL (Y to delete) N

Step 3: Sending the API Request

Method 1: Adding a New Alt URL via a Web Browser

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

bash
http://your-vicidial-server/vicidial/non_agent_api.php?function=update_alt_url&user=admin&pass=1234&source=AltURLUpdate&campaign_id=SALES_CAMPAIGN&dispo_code=SALE&alt_url=https://crm.yoursite.com/update_lead&active=Y

🔹 Press Enter, and the API should update the Alternative Call Disposition URL.


Method 2: Adding a New Alt URL 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=update_alt_url&user=admin&pass=1234&source=AltURLUpdate&campaign_id=SALES_CAMPAIGN&dispo_code=SALE&alt_url=https://crm.yoursite.com/update_lead&active=Y"

🔹 This will return a confirmation message indicating the Alt URL has been updated.


Method 3: Deleting an Alt URL via Postman

1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL with delete_url=Y
4️⃣ Click Send
5️⃣ The response should confirm that the Alt URL was removed


Step 4: Understanding API Responses

If the request is successful, VICIdial returns a response confirming the update:

makefile
SUCCESS: SALE | Alternative URL Updated Successfully

OR

makefile
SUCCESS: CALLBACK | Alternative URL Deleted Successfully

Breaking Down the Response

Response Value Meaning
SUCCESS The request was processed successfully
SALE The disposition code updated or deleted
Alternative URL Updated Successfully Confirmation message

Step 5: Handling Errors & Troubleshooting

Error Message Cause Solution
ERROR: USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION Insufficient API permissions Ensure user level is 8+ and API Access is enabled
ERROR: INVALID USERNAME OR PASSWORD Wrong credentials Verify API username and password
ERROR: CAMPAIGN NOT FOUND The specified campaign does not exist Ensure campaign_id is correct
ERROR: NO FUNCTION SPECIFIED Missing function parameter Ensure function=update_alt_url is included

Step 6: Best Practices for Using the update_alt_url API

Ensure all Alt URLs point to active, accessible pages
Use secure URLs (HTTPS) for better security
Restrict API access to prevent unauthorized changes
Test Alt URL updates in a test campaign before deploying
Integrate with a CRM to enhance post-call workflows


Conclusion

The update_alt_url API function is a powerful tool for customizing call disposition URLs dynamically in VICIdial. Whether you’re redirecting agents to CRMs, order systems, or support pages, this API provides a fast and efficient way to enhance agent workflows.

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