Re: Creating a form using Marketo APIs

Anonymous
Not applicable

Creating a form using Marketo APIs

We've created several fields in Marketo and given the APIs to a developer to create a form that is used on two seperate landing pages.  The only difference between the two is how a hidden field populates.  For one, it populare and the other, it is left empty.

We then created two seperate campaigns for each page and used the trigger, "data value changes" to distinguish the difference.  One it is left empty and the other populates.

For some reason, whoever fills out the form now receives a marketo confirmation email from each campaign.

How can we seperate the two?
Tags (1)
5 REPLIES 5
Brennan_McAdam2
Level 4

Re: Creating a form using Marketo APIs

Seems like it is an simple case of the trigger looking for the wrong value or you are referencing the same field in both and looking for any change.  Double check that.  I have done something similar and it works great, even has a dynamic interesting moment based on values from a custom form so I am not filling the databse with custom fields.
Brennan McAdams
Anonymous
Not applicable

Re: Creating a form using Marketo APIs

Hi,

Thanks for responding.  In one case I put, "new value is" and then the value that it changes to and then in the other I put, "New value is empty".  I was told by the developer that he has implemented it this way as well. When I do that, the lead who enters their info in either form is entered into both campaigns.

Do you think it's something on the developer side?

 Should I try a different trigger?  Right now I'm using "Data Value Changes".
Brennan_McAdam2
Level 4

Re: Creating a form using Marketo APIs

Sounds like it might be right, but without seeing the code it is hard to say. 

The documentation to fill in a hdden field value is at http://developers.marketo.com/documentation/websites/forms-2-0/.  The part that you need is

Set values on hidden fields on the form.

MktoForms2.loadForm("//app-sjst.marketo.com", "785-UHP-775", 1057, function (form){
//Set values for the hidden fields, "userIsAwesome" and "enrollDate".
//Note that these fields were configured in the form editor as hidden fields already.
form.vals({"userIsAwesome":"true", "enrollDate":"2014-01-01"});
});

Sounds as if you might be using just one form.  So if your trigger is when that form gets submitted I could see how both campaigns would be triggered.  I would suggest using two different form (it is the third parameter above).  I think is largely a logic flow.  So if I follow you, if i fill out one the other should be blank.  So you need to do that in two seperate Smart Campaigns.  It is having the success on a blank value if probably where the issue lays. 
 
Brennan McAdams
SanfordWhiteman
Level 10 - Community Moderator

Re: Creating a form using Marketo APIs

@Brennan M, @Melissa M isn't using Marketo forms at all (neither directly on an LP nor using the embed code). The forms are bespoke forms that presumably result in a subsequent server-side form post that we can't see.

So the field names and values that are passed to Marketo can't be directly controlled/viewed in the user-facing page.

@Melissa M from what I see, one page sends:
  1. vidyo_csrf_protection:
    aaa
  2. sales:
     
  3. saleEmail:
     
  4. firstName:
    Sanford
  5. lastName:
    Whiteman
  6. email:
    tester@test.com
  7. phoneNo:
    212-222-2222
  8. company:
    BLS
  9. title:
    CTO
  10. industry:
    Technology - Aerospace, Biotech, R&D
  11. companySize:
    0-99
  12. country:
    United States
  13. state:
    AK
  14. username:
    swhiteman
  15. password:
    333333
  16. confirmPassword:
    333333
  17. howHelp:
     
  18. comment:
     
  19. g-recaptcha-response:
    zzz
While the other sends:
 
  1. vidyo_csrf_protection:
    zzz
  2. device:
    samsung
  3. sales:
    ldugan
  4. saleEmail:
     
  5. firstName:
    Sanford
  6. lastName:
    Whiteman
  7. email:
    tester2@test.com
  8. phoneNo:
    212-222-2222
  9. company:
    BLS
  10. title:
    CTO
  11. industry:
    Technology - Aerospace, Biotech, R&D
  12. companySize:
    0-99
  13. country:
    United States
  14. state:
    AK
  15. username:
    swhiteman2
  16. password:
    333333
  17. confirmPassword:
    333333
  18. howHelp:
     
  19. comment:
     
  20. g-recaptcha-response:
    zzz
Thus the 2 major differences are that the /samsung one posts a value for `sales` instead of an empty value, and a value for `device` instead of no field/value at all.

I can't help any more without having access to the server-side code that actually connects to Marketo.
Justin_Norris1
Level 10 - Champion Alumni

Re: Creating a form using Marketo APIs

Not as technical an answer as either Brennan or Sanford...but it could be a simple order of operations issue, depending on how you are creating the lead.

If the lead is created and THEN the values are populated, there could be a moment in time when value of the hidden field changes to empty (qualify for first campaign!) and then changes to the new value (qualify for second campaign!).

Check your Activity History to see if this is the case. That is always a good place for diagnosing issues like these.

Justin Norris | Perkuto