Marketo Salesforce integration

Highlighted

Marketo Salesforce integration

Hi!

There is such thing in Marketo as SalesForce integration.

Not sure how exactly this works, but after user clicks that in Marketo UI then `sfdcId` and `sfdcName` fields are assigned to the program.

We are cloning Programs using API calls and customer want SalesForce integration to be automated as well.

Any ideas how to do this?

url = BASEURL + 'rest/asset/v1/program/' + str(

PROGRAMTOCLONEId) + '/clone.json?access_token=' + access_token

data = 'name=new programm test&sfdcName=some name&sfdcId=666&folder={"type": "Folder", "id":' + str(FolderId) + '}'

headers = {'Content-type': 'application/x-www-form-urlencoded'}

response = requests.post(url, data=data, headers=headers)

adding `sfdcId` and `sfdcName` to the call appears to be ignored.

at the same time `name` and `folder` is picked up and the new program is created in Marketo.

what am i missing here?

any ideas?

12 REPLIES 12
Highlighted
Marketo Employee

Re: Marketo Salesforce integration

http://developers.marketo.com/rest-api/assets/programs/#clone

http://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/clone...

The call doesn't take sfdcId or sfdcName as parameters. It takes name, the folder destination, and an optional description.

Highlighted

Re: Marketo Salesforce integration

Thank you Steven for clearing that out.

But is there a call that can update sfdcName? Can't find it. Maybe I am looking in a wrong place?

Or API is only limited to change name, description, costs, tags and start/end dates of a program?

Highlighted
Level 7

Re: Marketo Salesforce integration

No, API can't create a new SFDC campaign sync - not everyone uses Salesforce and arguably, even less people building API solutions would be using Salesforce.

Use Marketo UI to set SFDC campaign sync in Program Setup tab.

Highlighted
Level 7

Re: Marketo Salesforce integration

While not a true Marketo program to SFDC campaign sync, you can use REST API to trigger smart campaigns containing "Add to SFDC Campaign", "Change Status in SFDC Campaign" and "Remove from SFDC Campaign" in the flows to control SFDC campaigns with Marketo REST API calls.

You can also use {{my.tokens}} in the above flow steps

pastedImage_0.png

pastedImage_1.png

N.B. If the target SFDC campaign already has a properly setup sync with a Marketo program in place (set in the Marketo Program setup tab), then the smart campaign will skip the flow step and give the reason:

skip:

Skipped execution due to that the SFDC campaign {TE201903972 - Test Campaign} was linked with a program

Highlighted

Re: Marketo Salesforce integration

Thank you Jay for your input!

Unfortunately my limited Marketo knowledge restricts me from understanding the suggestion, but I will try to find someone here with better Marketo skills to help me with the flows.

Highlighted

Re: Marketo Salesforce integration

@Jay Jiang

Please forgive me my incompetence, but can you also post here "My Tokens" screen?

It appears i am unable to figure out how to create the tokens.

Which type should i pick?

pastedImage_0.png

Highlighted
Level 7

Re: Marketo Salesforce integration

I used Text tokens, but SFDC Campaign token works as well.

Highlighted

Re: Marketo Salesforce integration

sfdc token requires me to pick a value from a dropdown so i created text tokens.

after staring at your screens long enough i might start to understand the message you are trying to tell me.

just realized the token does not substitute to a value automagically, one have to update it.

so the action pattern should be:

1) i add my.token to template program

2) i add sfdc steps to template campaign flow

3) i clone the template program (with tokens and campaign with the sfdc steps and tokens as placeholders)

4) i get new campaign id

5) i update token values in the new cloned campaign

6) i activate the new cloned campaign that has token placeholder substituted with proper name

7) i enjoy magically created campaign in saledforce.

then i repeat steps 3-7 when required.

Jay Jiang​ does above sound like the correct approach?

Highlighted
Level 7

Re: Marketo Salesforce integration

Hi, most of it sounds right but note that you can't create a SFDC campaign using these smart campaigns, you still have to go into Program > Set up and do it.

pastedImage_0.png

What these smart campaigns allow you to do is to add/remove leads to your SFDC campaigns dynamically via API calls, you don't need to clone the smart campaigns so that they're in every program.

In the smart campaign trigger API call you can set temporary my.token values that are used for the trigger campaign over what was set in the Marketo UI for the same my.token,

this is how you can dynamically set the SFDC campaign name so your array of leads get added to it

pastedImage_2.png