CRM API Integration

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

CRM API Integration

Postby evroggio » Wed Oct 19, 2022 5:17 pm

Hello,

I'm running ViciDial VERSION: 2.14-859a / BUILD: 220623-0824.

I am looking to integrat with PipeDrive by sending a lead to PipeDrive using the webform button. PipeDrive API is all JSON based. Does anyone know if I can make a URL to create a new lead or new person directly into pipedrive from the webform button? I've spent a few days looking at ViciDial API and PipeDrive API, but I honestly cannot figure it out.. I am newer to development and could use some assistance on how I can make this integration work.
evroggio
 
Posts: 10
Joined: Tue Oct 18, 2022 10:33 pm

Re: CRM API Integration

Postby jamiemurray » Thu Oct 20, 2022 4:45 am

A PHP script that you call using the webform button could easily convert the input in the GET parameters to a JSON string and submit that to the pipedrive API is a relatively simple undertaking with someone familiar with PHP.

I'd approach the script like this:
1. Ensure the request is valid (not already done and required information complete) and that there's some sort of security check especially if your vicidial is open to the internet (checking for a recent valid call id, validating against vicidial_users table etc).
2. Construct an array from the GET parameters and the other fields you want to fill with fixed values in PipeDrive.
3. Use json_encode() to convert the array to a json array.
4. Use curl to call the Pipedrive API and return the response.
5. Check for success and perhaps update the vendor_lead_code with the lead id from pipedrive and optionally redirect the user to that created lead in pipedrive.
6. If error, return a friendly message to the user explaining the error, (missing required info, already pushed to pipedrive etc)

I'd then use the webform or even dispo url to call that PHP script I created.
Skype: live:support_71847 | Tel: (US) +1 646 647 8850 (CA) +1 613 900 6456 (MX) +52 55 9990 3550 (UK) +44 1324 285022 (ES) +34 922 937 384
Managed Hosting - No tech skills required | VoIP Termination & DID numbering | https://jmurraysolutions.com
jamiemurray
 
Posts: 179
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands


Return to Support

Who is online

Users browsing this forum: No registered users and 89 guests