AnsweredAssumed Answered

Informatica Email Hygiene Webhook

Question asked by 3557249dd109267a8f75df61a6532bfa7da1bfa0 on Jan 17, 2017
Latest reply on Jan 17, 2017 by sanford.whiteman

We have successfully implemented the Informatica/Marketo connector by creating a webhook that has response attributes mapped to custom Marketo fields for form submission on our websites. We would like to display helpful error handling messages on the front end of our Marketo 2.0 forms when certain email hygiene conditions are met.


For example, if a user types in an invalid email address and we are returning an Informatica email reason code of:  301. The Informatica response of email reason code 301 indicates that the email submission was missing the @ symbol. It would be helpful if we could then display "please ensure you have the '@' symbol" on the front end of our form before submission.


Is this possible through the Marketo Javascript API? We have tried a few methods with onValidate and onSubmit as seen below with no luck thus far.


MktoForms2.loadForm("//", "920-LJZ-738", 2151, function (form){


                  //get the values

                 var vals = form.vals();

                  //Check your condition

                  if(vals.emailReasonCode == "301"){

                    //prevent form submission


                    //Show error message, pointed at Email element

                    var EmailElem = form.getFormElem().find("#Email");

                    form.showErrorMessage("please ensure you have the '@' symbol", EmailElem);


                    //enable submission for those who met the criteria.