Hello,
I am using AC API to add deal via HTML form on my website. Depending on where they fill up form they enter into different stage of my marketing pipeline. Here is my problems:
Repeat entry is adding duplicate deal even when they have same deal name and contact.
I want to increase score automatically for deal, lead and organization when they submit forms on my website.
I also want to avoid duplicate deals for different people belonging to same organization. It should simply add that person to deal belonging to that organization.
Gotcha. Great! So I am assuming that you are using some kind of proxy server, to keep your ActiveCampaign API key & secret out of your client source code.
Part I
So in the proxy, I would add a bit more logic.
Start with a deal_list API call to return a list of all the deals. Then, I would iterate through that response, to check if there is a deal with a contact_email matching the new form submission.
If there is, then I would update that deal. If there isnt, then I would create a new deal like you were doing.
Part II
When you send the new deal, regardless of how you send it, I would also use the Event Tracking API to send an Event to ActiveCampaign. You can use that event to adjust the deal score if they send multiple forms.
Part III
Unfortunately, right now, you cannot attach multiple people to one organization. You can repeat the process of step 1 and add a note to an existing deal if the domain name matches though.