SOLVED

Triggering Smart Campaign off of Form Fill Submitted through API

Go to solution
adaydan1
Level 2

Triggering Smart Campaign off of Form Fill Submitted through API

I have a Landing Page where I've swapped out the marketo form for a calendly embed. This calendly embed, when submitted, triggers a marketo form submission through the "rest/v1/leads/submitForm.json" API on the backend. Along with passing the lead data, I am also passing along the pageURL where the calendly submission took place.

 

I can create a "fills out form" trigger constrained by the Referrer URL in a Smart Campaign in order to capture form submissions generated by this API. However, I would like to use the "webpage" constraint instead for the following reasons:

 

1. It is the trigger used for all other smart campaigns in our instance, and it would be preferable to have the same trigger here, rather than having to document and explain to others why "referrer URL" has to be used in these specific triggers rather than "webpage"

2. The referrer URL trigger will fail to fire if the Landing Page URL is changed in any way, whereas the webpage constraint doesn't have this issue 

 

I was wondering if there's any way to use the webpage constraint in my trigger to pick up these API form submissions? I've done a few tests, but haven't had much luck. I wanted to reach out here before I invest too much time in what could be a dead end.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Triggering Smart Campaign off of Form Fill Submitted through API

There’s really no reason to use the REST API at all for this. The Calendly JS API can be used to trigger a hidden Marketo form post. That’s far more scalable and requires no additional back end service like you must have now.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Triggering Smart Campaign off of Form Fill Submitted through API

There’s really no reason to use the REST API at all for this. The Calendly JS API can be used to trigger a hidden Marketo form post. That’s far more scalable and requires no additional back end service like you must have now.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Triggering Smart Campaign off of Form Fill Submitted through API

I second Sandy's suggestion! You should always consider using the background form submission method over using the formSubmit REST API call as the former is far more robust, scalable, and flexible (doesn't consume your API quota). Regarding your query on using Webpage vs. Referrer constraint, I'd say that Referrer is the preferred constraint over Webpage for embedded forms on non-Marketo pages. Check out Sandy's comment here where he discusses this in detail.