by 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