Re: Looking for REST api

Raj_S
Level 1

Looking for REST api

Hi,

  I am looking for Marketo REST api for validation purpose using automation. We are submitting the form with email address and I need to validate the email address with some SFDC Campaign data in marketo. So somehow if I can use REST api and get data in JSON  format, would be good.

thanks,

Mili

6 REPLIES 6
Rachel_Noble
Level 10 - Champion Alumni

Re: Looking for REST api

Hi Mili,

By validate, do you mean make sure that it's in an acceptable format (name@non-genericdomain.com) or are you actually referencing an SFDC campaign in particular?

Raj_S
Level 1

Re: Looking for REST api

So here are the steps:

1. Fill form from web page.

2. Go to marketo and make sure data is stored in SFDC custom field. So I am trying to automate this process. Validate means data is being captured in marketo with correct values. Hope this helps.

Rachel_Noble
Level 10 - Champion Alumni

Re: Looking for REST api

It sounds like you're hoping that the field value matches one of the possible picklist values in SFDC so that it syncs correctly. Correct me if I'm misunderstanding.

If that's the case, why not just use a picklist in the form as well, and match the SFDC values? Here's a quick overview of how to do just that:

Add a Country Picklist to your Form

This overview references the Country field, but you can do this with any field.

SanfordWhiteman
Level 10 - Community Moderator

Re: Looking for REST api

I didn't get the impression that it was an "allowed values" thing but if it is then certainly there's no need to check the back end on a legitimate form post, just use a picklist as you say...

SanfordWhiteman
Level 10 - Community Moderator

Re: Looking for REST api

Go to marketo and make sure data is stored in SFDC custom field. So I am trying to automate this process.

You can use the method I described here if you really, really want to check the Marketo db after submission:Validate email address live on the landing page

But checking just for the sake of checking (if you're not going to use the variables in the page) doesn't make sense outside of a brief testing period. At a certain point, you need to trust that a form fillout is going to be posted to the back end database, even if it happens 30 seconds later.  Distributed systems like Marketo -- and many others -- are said to be eventually consistent. That means that, while a change may propagate across every system in 10 milliseconds 99.999% of the time, it's not guaranteed to be propagated from every vantage point immediately.

SanfordWhiteman
Level 10 - Community Moderator

Re: Looking for REST api

You cannot call the REST API directly from the browser, period. And even if you passed such a request through an intermediate server, you'd be creating a DoS vulnerability.

What is it exactly that you're trying to do? Figure out whether a lead is in a Marketo program already? Why does this need to be known on the browser side?