2 of 3 people found this helpful
Hi Phil, here is an internal document that may be useful:The first step is to create a form in Marketo or to use an existing form that you want to submit. The name of the form needs to be descriptive, but it does not actually need any form fields. If you create a new form, simply enter a name, uncheck the “Open form editor” box and you’re done.
1. Create a Form (If Needed)
2. Find a Form IDIn the Marketo UI, select the form and look at the URL: it should be of the format https://app-x.marketo.com/#FO8B2ZN12. Behind the # sign, look at the number immediately following “FO” to find the Form ID. In this case, the Form ID is 8. In some cases, your first form may be numbered 1001 and count up from there. The Form ID is a variable, so that you can trigger the submission of different forms.
3. Get Your Marketo Account IDGo to Admin > Munchkin and copy the Munchkin Account ID, which has the format of 000-AAA-000:
You’ll need this so that the form is submitted into the correct Marketo instance.
4. Determine the POST URLWhen in the Marketo user interface, note the domain in the location bar, usually of the format http://app-x.marketo.com/. Discard anything after the slash, then append “index.php/leadCapture/save” to get the full form POST URL. Note 1: this is case sensitive. Note 2: Marketo Sandboxes may have a different domain than your Production Marketo system. So an example URL would be:
You can also use HTTPS instead of HTTP (do not use your CNAME as it will give a security exception).
5. Find the Form Field NamesGo to Admin > Field Management and click the “Export Field Names” button to download a spreadsheet with the API field names. Use the API name as the name in your name-value pairs.
6. Decide Which Fields to POSTYou can include any Marketo Lead field in your form submission. Please note that field names are case sensitive. In addition to the fields you want to submit there are two mandatory fields and two recommended fields:
Mandatory fields on the form:· munchkinId - enter your Munchkin Account ID as the value
· formid - indicates which form in Marketo has been submitted
Recommended fields on the form:· Email - this is used as the primary key for deduplication; if it finds a matching email address in the Marketo database, it will update the existing record, otherwise it will create a new record; if multiple matches, it will update the most recently updated record
· _mkt_trk - this carries the cookie information, so you’ll be able to track the individual’s web page visits; if you have Munchkin on your form page, the Munchkin will automatically enter a value in this (hidden) form field. If no, read it from the cookie with the same name and pass it to Marketo in this field
7. See the ResponseThe response to the form post will be an HTTP 302 code (redirect), which in some systems will appear as an error, however, it means that the Lead is successfully created or updated. If there is a real error, you could receive a 404 or 50x error code.
That should be exactly what I need. Thanks
I'm getting a 404 error when I use this method to determine the POST url. Is there any other place we should be posting this data?
If you get a 404, that usually means the munchkinId is not correctly specified. Please check spelling and case
Hope that helps,
Thanks Jep, but the munchkinId is correct. I'm sending it as part of the post data though, was it supposed to be appended to the URL as well?
You may want to open a support ticket and specify the exact URL and all the parameters you're passing. If some of the required parameters are missing or incorrect it will give a 404. So a 404 error is not necessarily a sign that the URL is incorrect.
Add a few things--a correct submission return code we see is 200 and not 302. In addition, if passing multipe-value (from a multi-select picklist), do not pass a multiple key/value pairs, instead pass them as as a single key and the values as a semi-colon delimited list.
Things we learned the hard way
- Make sure your firewall isn't blocking your posts (took a while for us to figure out in the test environment).
- Firefox add-on called Poster is your testing friend
- 404 is always returned if there's anything wrong with the post
- Fields are supposedly case sensitive
Thanks for your feedback Mark! We'll update the article.
Came by this post - great article Jep. Btw, now the form endpoints now use your CNAME subdomain instead of POST URL
This is a great article, learned quickly to set this up. I've manged to POST successfully with Email, formid, munchkinId.
What I'm not understanding is the '_mkt_trk'. above in the article you state "if you have Munchkin on your form page" does this mean to place my marketo form onto a marketo landing page for the Munchkin to work?
I thought by your article that I dont need a landing page just a blank form to POST to.
Also, "If no, read it from the cookie with the same name and pass it to Marketo in this field" How do I set up to read it from the cookie?
Thanks for responding quickly Jep.
I'm a little confused when you mention 'form'. Marketo form or something else?
Our 3rd-Party profider is going to POST leads to our form which is not being used on a landing page. I can't find '_mkt_trk' in Field Management to use on my form to make hidden.
I added '_mkt_trk' to my HTTP test plug in for Google Chrome. All works well, lead got created with 'filled out form' activities.
As you can tell I'm new to playing with HTTP POST.
Edward, your 3rd party provider will not have access to your tracking cookie, so you can't pass on the Cookie ID
Jep, thank you so much for spelling that out. You should transform this into an official knowledge base article!
Thanks Delinda, I've been trying that for 7 months, I will submit it again
Since this method has become quite a bit more popular, I just wanted to add a little extra information to the method that Jep provided. There are three required parameters in the POST made to the Marketo Leadcapture URL. These are case sensitive: 'formid' the ID of the form you want to appear in the activity log, 'returnLPId' should equal -1, and 'munchkinId' which is your Munchkin ID.
We've been successfully using this method to post leads into Marketo for about 1 year and we noticed over the last couple of weeks, that we've been receiving a HTTP 429 response ( Too Many Requests) after ~10 consecutive form posts from some of our external vendors. Has something changed that would cause the server to timeout after multiple requests? Maybe something in a recent release? If there's a new timeout limit, how much time should we wait between posts? Thanks, Brian.
We are experiencing the same behavior (HTTP 429) when sending multiple posts in a row. Is there some kind of governor limits being put into place?
I'm checking to see whether anything has changed. I'll let you know as soon as I find out. Also feel free to open a support ticket.
Thanks Jep. I did open a support case yesterday and received this response. which helped explain the reason for the new HTTP response.
There has been enhanced security on that issue with the last release.
A)What is the rate limit, in terms of the max no. of HTTP POST requests, per second?
Answer: 10 requests / 60 sec.
B)If a customer does go over(receive a 429) is there any back-off period we need to wait before attempting to resend?
Answer: Yes, 60 sec after the last request.
The above is on a per ip basis. In terms of suggestions to avoid this, you'd need to adhere to the above; or have you looked into using something like SOAP API to sync the leads?
That would get around the security measures that were put in due to http posting (I believe if I remember correctly the changes were made to have adherence to newer EMEA based laws).
Yes, that's the same info that I got. So you either need a limiter or use the SOAP API or future REST API.
The limit has been increased to 30 form submissions per minute as of tonight.
I am very new to Marketo and server side requests to Marketo
I am trying to make POST leads to Marketo DB from 3rd party vendors side
I am passing to dataload URL ('http://app-abj.marketo.com/index.php/leadCapture/save'), munchkinId, formid, and only field I created in that form called 'Email'
As response, I get 200 and this page in it 'https://app-abj.marketo.com/homepage/login'
No lead is created.
What am i missing?
It sounds like you're passing the minimum information you need. Have you tried using http://www.hurl.it/ or similar tool to simulate an HTTP POST and confirm the request and response is correct. This helps me confirm I've got all of my parameters and values correct before I start building it into my production process.
Thanks Brian, it worked for me!
Works great! I used this with a ShortStack webhook for one of our facebook contests.
I am trying to set up a webhook within shortstack to marketo for an upcoming contest we have. I am completely new at this and was wondering if you have any or know of any documentation available?
Thank you for any help you could give!
Anyone willing to share real life working examples (URLs) of the server side post in action? We might need to use this for a current project and I'm curious how others are implementing it.