AnsweredAssumed Answered

Need help with HTTP POST to Cvent

Question asked by Alex Bridges on Apr 17, 2018
Latest reply on Apr 18, 2018 by Sanford Whiteman

I recently posted a question about traveling down the vast rabbit hole that is Cvent's SOAP API. Well, after talking with Cvent some more, it turned out that it all could be easily avoided, by posting to their form.

 

I'm trying to go about it in one of two ways, both of which are not working so great, and I'm hoping I can get set straight here.

 

Method one: Posting on a Marketo form on a Marketo landing page, and then having a webhook called with a query string to Cvent's registration link. This should work, in theory, according to their documentation. But it's returning an error. I'm not sure if it's the formatting of my query string (though I don't believe it is), or an error with their side.

 

Method two: Using their posting form on our landing page, and then having a hidden Marketo form to update leads on our end. I've looked at the documentation available (http://developers.marketo.com/blog/make-a-marketo-form-submission-in-the-background/ and MktoForms2 :: HTML form to Mkto form ), but it's not counting as a form fill or updating anything on the Marketo side.

 

This is a an extremely stripped-down example of what I'm using:

 

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <style>
      body {background:#fff;} 
  </style>
<script>
var htmlForm = MktoForms2.allForms()[0];
htmlForm.addHiddenFields({
//These are the values which will be submitted to Marketo
"Email":"",
"FirstName":"",
"LastName":""
});
htmlForm.submit();
  </script>
  </head>
  <body>
    <div class="mktoText" id="exampleText" mktoName="Example Text Area">
<form name="TestRegForm" id="htmlForm" action="http://www.cvent.com/Events/APIs/Reg.aspx" method="post">
<P>
<TABLE>
  <TBODY>
  <TR>
<TD><font color=red>*E-Code:</font></TD>
<TD><INPUT size=36 name=ecode></TD>
<TD>Event Stub Format: (88888888-4444-4444-4444-121212121212)</TD></TR>
  <TR>
<TD><font color=red>*First_Name:</font></TD>
<TD><INPUT size=30 name=first_name></TD>
<TD></TD></TR>
  <TR>
<TD><font color=red>*Last_Name:</font></TD>
<TD><INPUT size=30 name=last_name></TD>
<TD></TD></TR>
  <TR>
<TD><font color=red>*Email_Address:</font></TD>
<TD><INPUT size=30 name=email_address></TD>
<TD>Must be valid email format: (abc@abc.abc)</TD>
  </TR>
</TBODY>
</TABLE>
</P>
<INPUT type="submit" value="Submit" name="submit_form">
</FORM>
<script src="//app-sjXX.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_0000" style="display:none;"></form>
<script>MktoForms2.loadForm("//app-sjXX.marketo.com", "123-XYZ-456", 0000);</script>
    </div>
  </body>
</html>

 

Yes? No? I notice my input names needed for Marketo aren't the same as the input names for these fields (ex: Marketo uses "FirstName" while Cvent uses "first_name")...could that be a thing? What about those example values, do I ditch those? how does it update those hidden fields if the input names aren't the same? Does that mean I need to create custom fields to match those? What about why it's not counting a form fill in the first place? aaah help...

Outcomes