Page 1 of 1

Trigger API upload of lead on dispo

PostPosted: Tue Jul 23, 2024 12:43 pm
by fcabrera
Hello is there a way when agent dipositions a call say SALE that the system uploadds the lead via API?

Re: Trigger API upload of lead on dispo

PostPosted: Thu Jul 25, 2024 2:04 pm
by williamconley
1) Welcome to the Party! 8-)

2) As you are obviously new here, I have some suggestions to help us all help you:

When you post, please post your entire configuration including (but not limited to) your installation method (11.X.X?) and vicidial version with build (VERSION: 2.X-XXXx ... BUILD: #####-####).

This IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "manual/from scratch" you must post your operating system with version (and the .iso version from which you installed your original operating system) plus a link to the installation instructions you used. If your installation is "Hosted" list the site name of the host.

If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (EG: vSphere Version 6.X.X). If it is not, merely stating the Motherboard model # and CPU would be helpful.

Similar to This:

Vicibox 11.X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC Mbd | Core2Quad Q6600 CPUs

_________

3) In both Campaign and Ingroup settings is a field for "Dispo Call URL". This can be used to push ALL the information from the lead to a PHP page on the server, which can in turn send any/all data to a 3rd party API.

You can put the API directly in the field, but this requires formatting of the URL string (often extensive formatting) and requires that the API accept the field names AND requires that the API accept key/value pairs as a GET form submission. So it's not unusual to just build a php page to "reformat and resend". The instructions for this field are very similar to the "Web Form" and "Web Form Two" and the field list is very similar to those in the "Scripts" module.

4) If you have not yet downloaded the Free version of the Vicidial Manager's Manual (available on EFLO.net), this would probably be a very good time to do so.

Happy Hunting! 8-)

Re: Trigger API upload of lead on dispo

PostPosted: Thu Jul 25, 2024 8:16 pm
by fcabrera
Thank you for the quick reply.. running asterisk 13.38.2-vici with Vicidial : 2.14-842a BUILD: 220127-2915.. I am familiar with the Dispo Call URL field in campaign however I was hopping for a solution to send only if DISPO SALES for example. DO you nw the file that runs the age or pl to execute Dispo Call URL:?

IS there another better simpler solution shirt if writting PHP to run in crond and pull and matching DISPO and uplaod? I was thinking maybe a menu with AGI ?


Thank s in advance.

Re: Trigger API upload of lead on dispo

PostPosted: Fri Jul 26, 2024 10:22 am
by williamconley
fcabrera wrote:Thank you for the quick reply.. running asterisk 13.38.2-vici with Vicidial : 2.14-842a BUILD: 220127-2915.. I am familiar with the Dispo Call URL field in campaign however I was hopping for a solution to send only if DISPO SALES for example. DO you nw the file that runs the age or pl to execute Dispo Call URL:?

IS there another better simpler solution shirt if writting PHP to run in crond and pull and matching DISPO and uplaod? I was thinking maybe a menu with AGI ?


Thank s in advance.


Let's try this step by step:

What format is your API expecting? (Options such as "JSON", "HTML Form Data", "CSV", "SOAP" ... but there are no limits really, every coder has a view on this topic and they all like their own version)

Can you modify the API's expectations to match the Field Names which Vicidial will provide? (IE: Can you create settings on the API's management page to set field names?) If not: Are the field names that the API expects mostly the same as the Vicidial field names? The list of Vicidial parameters/fields is available in several places, but the simplest way to see them is to put "x.php" in the Web Form field of a campaign and select "Web Form Submit" at the moment of disposition rather than merely "submit". The "Web Form Submit" will open a new web page with the web form URL and push all the available data into it from this lead. There's ... a lot of data available (Caution: The data available includes the Vicidial Agent's User and Password!!)

There are example dispo_url's available. Including the ones already on your Vicidial server (in /srv/www/htdocs/agc/: dispo_move_list.php; dispo_change_status.php; dispo_add_FPG.php; dispo_send_email.php). They have instructions for use.

Those are as simple as it gets. Any one of those can be modified to re-submit to an API based IF the disposition (or disposition category) matches your requirement.

We generally charge about one hour of production time for a standard CRM push (from Vicidial's lead table to one table in a remote system or one api call). We still expct YOU to provide a field map from the Vicidial Fields to the API (or CRM) fields unless you want us to Guess.