I'm brand new to Javascript and Marketing Ops and I've recently been following a guide Jack Coldrick created on building a referral program.
Since he wrote the guide, the syntax used to connect to the API has changed a little bit which is reflected in lines 12-15 in the code I've attached.
In this particular action, Hubspot is supposed to be able to find a contact with the Referrer ID that matches a number that a prospect put into a form when they signed up for a demo. The action then updates a number of things on that same contact. (See the guide link for more details.)
I've spent the better part of this week running through every troubleshooting tip and article that I've been able to find, but my code still runs an error when enrolling a contact. Any idea what might be wrong with my syntax?
Aug 15, 202311:29 PM - edited Aug 16, 20231:23 AM
Contributor
Troubleshooting Custom Coded Actions
SOLVE
We had to adjust the search query, converting the referrer id to a string so it could be matched. We also changed some of the syntaxes within the search as they were outdated.
Have a look at this and make some amends to yours.
Note: instead of "referrer" I named my property referrer code.
I've recently implemented this for my company and had a similar issue I managed to fix! I can't see the code snippet attached, could you send it again and I'll have a look?
Verify that your code syntax aligns with the updated standards. Double-check API connection and Referrer ID matching. Review error messages and debug using coding tools. Explore relevant API documentation and seek community support. Persistence pays off in debugging!
Aug 15, 202311:29 PM - edited Aug 16, 20231:23 AM
Contributor
Troubleshooting Custom Coded Actions
SOLVE
We had to adjust the search query, converting the referrer id to a string so it could be matched. We also changed some of the syntaxes within the search as they were outdated.
Have a look at this and make some amends to yours.
Note: instead of "referrer" I named my property referrer code.