Marketo Salesforce integration

Javier_Sanchez1
Level 2

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
Steven_Vanderb3
Marketo Employee

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.

Javier_Sanchez1
Level 2

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?

Jay_Jiang
Level 10

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

Javier_Sanchez1
Level 2

@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

Jay_Jiang
Level 10

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

Javier_Sanchez1
Level 2

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?

Jay_Jiang
Level 10

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

Javier_Sanchez1
Level 2

I can't?

really?

the process we have is:

1) there is third party program where an event is created. in our case a meeting. usually it is defined like half year in advance and there are no leads. just a placeholder in a calendar to book a room.

2) there is a tool which can see there is a new meeting and create Marketo program using API.

3) when the scheduled date is approaching leads are added to the event in third party program and the tool add those leads to the Marketo program as well.

4) currently somebody has to log into Marketo and do the clicking for the program to appear in Salesforce.

the goal is to add an API call or two between steps 2) and 3) in order to eliminate step 4).

any ideas how can i do it?

Jay_Jiang
Level 10

No it's not possible to build a solution that would eliminate Step 4 at this stage

Javier_Sanchez1
Level 2

That's sad.

Thank you for your input!

Javier_Sanchez1
Level 2

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.

Jay_Jiang
Level 10

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.