SOLVED

Re: Salesforce Custom Object Sync - 2 Levels Down

Go to solution
Ben_Neal1
Level 2

Salesforce Custom Object Sync - 2 Levels Down

I'm trying to sync a custom object in Salesforce to Marketo that has a custom junction/MtM object in between it and the Contact but the object isn't available in the list of objects to sync. The entity relationship looks like this: Contact < MtM__c > Membership__c. This can be read as as "a Contact can be associated to many Memberships and a Membership can be associated to many Contacts. Is this type of relationship supported in the Salesforce Custom Object sync?

I see the MtM object is available for syncing, but I would also expect to see the Membership object under that MtM object if supported. I believe permissions are configured correctly. Marketo has the disclaimer "Marketo only supports custom entities that are linked to standard entities one or two levels deep. " That statement isn't clear if a custom entity linked to another custom entity is supported.

Any thoughts? Do I have to use the non-Salesforce custom object to pull in this relationship?

Thanks!

Ben Neal

1 ACCEPTED SOLUTION

Accepted Solutions
Veronica_Holme4
Level 10 - Champion Alumni

Re: Salesforce Custom Object Sync - 2 Levels Down

Hi Ben - I'd expect that to be available for syncing under normal circumstances since you've already stated Velocity scripting limitations don't worry you. What's the relationship between the MtM object and the Membership object? Junction objects are not usually an issue for Marketo so I'd wonder 1) how the relationship between those custom objects is created, and 2) have you given the Marketo sync user permission to read that custom object you're looking for in Salesforce.

For the relationship to be recognised, you need a Lookup or Master/Detail relationship for the sync to see it.

V

View solution in original post

8 REPLIES 8
Grégoire_Miche2
Level 10

Re: Salesforce Custom Object Sync - 2 Levels of Down

Yes it is supported, but in reality not very practical.

See this discussion on the very same topic.

-Greg

Ben_Neal1
Level 2

Re: Salesforce Custom Object Sync - 2 Levels Down

Thanks Grégoire Michel​. Looking around it seems that a 2nd level object isn't recommended due to Velocity Script integration issues, but is otherwise supported. If my goal is to sync this 2nd level Salesforce object to Marketo with as little additional modification and effort and I only plan to filter based on this object - not needing Velocity - is there something else that makes this "impractical"?

Grégoire_Miche2
Level 10

Re: Salesforce Custom Object Sync - 2 Levels Down

Hi Ben,

No, nothing else

-Greg

Veronica_Holme4
Level 10 - Champion Alumni

Re: Salesforce Custom Object Sync - 2 Levels Down

Hi Ben - I'd expect that to be available for syncing under normal circumstances since you've already stated Velocity scripting limitations don't worry you. What's the relationship between the MtM object and the Membership object? Junction objects are not usually an issue for Marketo so I'd wonder 1) how the relationship between those custom objects is created, and 2) have you given the Marketo sync user permission to read that custom object you're looking for in Salesforce.

For the relationship to be recognised, you need a Lookup or Master/Detail relationship for the sync to see it.

V

Ben_Neal1
Level 2

Re: Salesforce Custom Object Sync - 2 Levels Down

Hi Veronica Holmes​. I was able to get 2nd level custom objects synced. It was a field level permission issue that was not allowing the 2nd level object to be synced. Thanks for the follow up.

Veronica_Holme4
Level 10 - Champion Alumni

Re: Salesforce Custom Object Sync - 2 Levels Down

It'd be great if you could mark the thread as answered.

Nicole_McQuade
Level 2

Re: Salesforce Custom Object Sync - 2 Levels Down

Hi Ben. Can you explain how you were able to get the 2nd level custom objects synced? How were you able to resolve the field level permission issue? Was that a Marketo or a Salesforce issue?

Thanks.

jfil
Level 2

Re: Salesforce Custom Object Sync - 2 Levels Down

For anyone who landed here looking for guidance on setting up complicated many-to-many custom object synchs, Here is an example of something I tested.

 

Here is our setup. There is a Many-to-many mapping that can happen between Leads, Accounts and "Tenant" objects. This is done through an intermediary "Tenant Mapping" object. To complicate things, the Lead and Account could point directly to a Tenant, not going through an intermediary object (but I didn't care about that scenario for Marketo setup purposes).
Our setup in SalesforceOur setup in Salesforce

This is what the Salesforce Object Sync map looks like when you refresh the schema. You can see that, under the Lead, there is a "Tenant" listed directly (this is for getting the tenant that's directly linked to the Lead), and there is a "Tenant Mapping" with a "Tenant - Lead" underneath. That's the one we want to sync over - because it uses the many-to-many intermediate object. Note that "Tenant - Lead" and "Tenant - Account" originally came through as just "Tenant". You have to rename them so they're unique. Marketo will pull the data only once (it won't create copies of the Tenant rows) - this is just a cosmetic renaming you need to do.

 

Sync only the objects in green. Marketo will "implied sync" the intermediate object.

How Marketo Object sync sees thingsHow Marketo Object sync sees things

Detailed view. You can see how many of the Tenant objects are available in SFDC, vs. how many were brought over to Marketo. If you refresh this window during initial sync, you'll see the Marketo go up on each refresh.
Details from the Lead->Tenant mappingDetails from the Lead->Tenant mapping

The result:

  • For people who are SFDC Leads, Marketo is aware of all the Tenant objects connected to them.
  • For Contacts, Marketo will look into the Tenants associated with the Account they belong to. That means all the Contacts under an Account will be aware of all the Tenants that the Account is connected to. 
  • Again, because the linkage between Lead->Tenant and Account->Tenant is a lookup field, Marketo won't update the Tenant data until the Lead or the Account is updated. Each time you alter/add a Tenant / Tenant Mapping record, you have to update the associated Lead/Account.
  • Because the Tenant objects have different names and are seen as different filter conditions, your filters have to check both: in case the Marketo Person is a SFDC Lead or a SFDC Contact

Huge thanks to Veronica Holmes who explained a lot of this in the following video: https://www.youtube.com/watch?v=qXt1CPMZReA