15 Replies Latest reply on Aug 8, 2015 8:33 AM by Sanford Whiteman

    Need help! with POST URL setup

      I am really lost right now...A vendor of ours has created a form/landing page that will be featured on various websites. She has asked that I send a POST URL to her, in addition to the fields that she should map to (including hidden fields). Well, I went to an article for guidance, and it ended up confusing me more.


      I believe I was able to create the POST URL, which I sent to her, https://app-ab05.marketo.com/index.php/leadCapture/save, but I'm confused when in the article it say, Note: The body of the POST to a Marketo form must be URL encoded. What does this mean???


      Also, I am totally lost in regards to which fields to send her to map to. The article says "Go to Admin > Field Management and click the “Export Field Names” button to download a spreadsheet with the API field names," which I did, but then I'm not sure which fields to send her because there are three different types: REST API, SOAP API and Friendly Label. Within each of those types, the fields are completely different with different spacing, lowercase vs. uppercase, etc.


      Also, the article says I should send "(1) munchkinId – This field is used for your Munchkin Account ID, (2) formid – This field indicates which form in Marketo has been submitted" and  "1) Email – this field is used as the primary key for deduplication. and  (2) _mkt_trk – this field carries the cookie information." I do not know where to find these two (they weren't in the spreadsheet I exported). Also, her question to me was do these fields have blank variables--I don't know how to respond...Please help!!!

        • Re: Need help! with POST URL setup
          Sanford Whiteman

          The easiest way to deliver what she needs is by creating a mockup of the form itself in Forms Editor, then sending her the embed code.  In fact you need to have such a form if you are going to give her a Form ID!   By sending her the embed code, she can see for herself all the form names, including proper capitalization and mandatory hidden fields.  There can't be any confusion that way.


          The only thing that she might not get straight away (if she's not a Marketo developer) is the _mkto_trk/_mkt_trk cookie.  This only applies if the site is running Munchkin.  Is it?


          As for form encoding, URL-encoded is the default so I'm sure she's already using it.


          If you have more questions, just hit me up at https://purechat.me/sanford.  I'm around!

          • Re: Need help! with POST URL setup

            Hi Laura,


            Here are the steps you might want to follow. I tried to keep it simple here.


            1> Assume that you want to create a landing page with form in Marketo to capture all the fields the vendor wants to capture on their form(s). Create a working landing page that with form in Marketo.


            2> Open this landing page in your browser, view html source. Copy the html source.

            You will have html  something like,


            <li  class='mktFormReq mktField' ><label>Company Name:</label><span class='mktInput'><input class='mktFormText mktFormString mktFReq' name="Company" id="Company" type='text' value=""  maxlength='255' tabIndex='4' /><span class='mktFormMsg'></span></span></li>

            <li  class='mktFormReq mktField' ><label>Work Email:</label><span class='mktInput'><input class='mktFormText mktFormEmail mktFReq' name="Email" id="Email" type='text' value=""  maxlength='255' tabIndex='5' /><span class='mktFormMsg'></span></span></li>

            <li  class='mktFormReq mktField' ><label>Work Phone:</label><span class='mktInput'><input class='mktFormText mktFormPhone mktFReq' name="Phone" id="Phone" type='text' value=""  maxlength='255' tabIndex='6' /><span class='mktFormMsg'></span></span></li>

            and so on....


            Each of the fields your form need to ask will have html like 'name="Company"' or name="Phone" and so on for each field.

            These are the field names you need to give to your vendor.

            As you already know, there are additional mandatory fields such as munchkinId and formid needed.


            3> Your vendor will write the code which will do the http post to this form with these fields. She will take care of encoding the http request. You do not have to do anything there.


            4> When she submits the form for trial run, you can see these submits when you write a smart list listening to that form submit.


            Hope this helps




              • Re: Need help! with POST URL setup
                Sanford Whiteman

                It'll be more maintainable to send the URL of the LP as the guide, or to send the embed code.


                When the required form fields change (and this will eventually happen) they'll automatically update in the live form. Sending HTML fragments is sure to end in sadness.  I never want to receive HTML via email (don't even like seeing it on a forum unless it's properly formatted or is very short).  First thing I do is copy the HTML into a live site to see if it actually works, so there's no reason to add an extra step!

                • Re: Need help! with POST URL setup

                  Rajesh, are you saying that the fields the developer needs are the ones highlighted in orange below?



                  <form class='mktoForm mktoNoJS' action='http://pages.jerusalemprayerteam.org/index.php/leadCapture/save' method='post'>

                    <div class='mktoFormRow'>

                    <div class='mktoFormCol'>

                    <label class="mktoLabel" for='FirstName'>

                    First Name:  </label>

                    <input type="text" class='mktoField mktoTextField' name='FirstName' id='FirstName'>



                    <div class='mktoFormRow'>

                    <div class='mktoFormCol'>

                    <label class="mktoLabel" for='LastName'>

                    Last Name:  </label>

                    <input type="text" class='mktoField mktoTextField' name='LastName' id='LastName'>



                    <div class='mktoFormRow'>

                    <div class='mktoFormCol'>

                    <label class="mktoLabel" for='Email'>

                    Email Address:  </label>

                    <input type="text" class='mktoField mktoTextField' name='Email' id='Email'>



                    <div class='mktoFormRow'>

                    <div class='mktoFormCol'>

                    <label class="mktoLabel" for='LeadSource'>

                    Source:  </label>

                    <input type="text" class='mktoField mktoTextField' name='LeadSource' id='LeadSource'>



                    <div class='mktoFormRow'>

                    <div class='mktoFormCol'>

                    <label class="mktoLabel" for='salemID'>

                    Salem ID:  </label>

                    <input type="text" class='mktoField mktoTextField' name='salemID' id='salemID'>



                    <span style="display:none;"><input type="text" name="_marketo_comments" value=""></span>

                    <span class='mktoButtonWrap'><button type='submit' class='mktoButton'>Submit</button></span>

                    <input type="hidden" name="lpId" value="1290" />

                    <input type="hidden" name="subId" value="144" />

                    <input type="hidden" name="lpurl" value="http://pages.jerusalemprayerteam.org/Capital-Petition.html?cr={creative}&amp;kw={keyword}" />

                    <input type="hidden" name="formid" value="1228" />

                    <input type="hidden" name="ret" value="" />

                    <input type="hidden" name="munchkinId" value="591-HWU-361"/>

                    <input type="hidden" name="kw" value=""/>

                    <input type="hidden" name="cr" value=""/>

                    <input type="hidden" name="searchstr" value=""/>

                    <input type="hidden" name="_mkt_disp" value="return"/>

                    <input type="hidden" name="_mkt_trk" value=""/>




                  Thank you,