At the time of writing this article, there was no way to update a ClickFunnels contact through an API or through Zapier. ClickFunnels doesn’t have an official API (They do have a limited API) and Zapier integration is only one way, meaning you can only get updates from ClickFunnels.
The method I am explaining below is a hack. Hopefully, ClickFunnels will come out with a well-developed API 🙂
In funnel steps, you can setup custom forms to update contact records or add/remove actionetics tags. An behind the scenes ClickFunnels funnel step pages have a programming logic in place to update a full contact. Let me elaborate, view any funnel step in a browser, go to view source to checkout page’s source. Search for “<form”. You’ll see a big form in the code with all the contact fields in it.
So the hack is to submit this form with data using a script/bot making it possible for us to update contacts using external scripts. For a recent project I did, a client wanted to add a tag to a contact (which triggered an actionetics sequence) when he marked a lead as “won” in pipedrive. We set up a webook from pipedrive to our script which behind the scene visit the funnel step page and submit this form with data from the webhook.
I have put this script live on github to download – Download Zip
Additionally, view the source – https://github.com/sahanh/clickfunnels-contact-creator-updator
The script is not a plug and play, so you’ll need to mess with the code. Check the index.php file where I have place comments. You will have to host the script somewhere. It requires PHP 5.6+.
To make this work, we need to set up a placeholder page in ClickFunnels. I typically set one up outside the funnel.
Once you set up the page, get it’s direct url. To do that, visit the funnel step url. ClickFunnels will redirect you to the direct page. Get the link from browser address bar.
Creating or updating a contact
Once you get the funnel’s direct link, update the index.php file
Then update, $fields array to contact information.
ClickFunnels use email as the duplicate matcher, so when you send details under an existing email, it will update an existing contact with the same email.
Adding tag to a contact
To add a tag to a contact we are submitting, we need to set up an action on the page. To do this, set up actionetics as an integration.
Once you select actionetics, you can do 1. Assign Tag, 2. Remove Tag, 3. Add to List, 4. Remove from List, 5. Email Notification.
When our script submit information of the contact, actionetics will kick-in.
Check out the below video for more information.
Icon made by Freepik from www.flaticon.com