SOLVED

Setting up a many-to-many relationship with Custom Objects

Go to solution
Tom_liolios2
Level 1

Setting up a many-to-many relationship with Custom Objects

Hi everyone,

 

We have a Salesforce instance in which all our Accounts are tagged for segmentation purposes. In Salesforce, each account has one Tag Assignment, which is related zero or more Tags. I'm assuming this constitutes a many-to-many relationship: many Accounts are related to many Tags through Tag Assignments, which serves as a 'Bridge Object'.

 

We would like to synchronize the Tags in our Salesforce instance with Marketo, either manually (Import Custom Object Data) or automatically (API). Therefore, I'm attempting to replicate the data model with Custom Objects in Marketo. Unfortunately, I can't seem to figure out what the best approach is.

 

I have taken the following steps:

  • Create a Custom Object 'Tag'
    • Create a 'Tag ID' field and set it as deduplication field
    • Create a 'Tag Name' field
  • Create a Custom Object 'Tag Assignment'
    • Create a 'Tag Assignment ID' field and set is as deduplication field
    • Create a 'Company ID' field, set is as link field and link it to the 'Company ID' field on the Company Object
    • Create a 'Tag ID' field, set it as link field and link it to the 'Tag ID' field on the Tag Object

At first glance, this approach seems to work. But when I import Custom Object Data, not all person records with the same Company ID receive a tag. It seems as if it only relates the Custom Object to the first 'Person' is sees, while it should be related to the 'Company'.

 

Does anyone have experience setting up something like this? It would be very helpful to get some additional pointers.

1 ACCEPTED SOLUTION

Accepted Solutions
Michael_Florin
Level 10

Re: Setting up a many-to-many relationship with Custom Objects

Hey Tom,

 

I don't think I said that. 🙂

https://docs.marketo.com/display/public/DOCS/Understanding+Marketo+Custom+Objects#UnderstandingMarke...

Here's the passage I was referring to. It hides in this sentence:

"Custom Objects can only directly link to a single record. This means that when your custom object type is linked by company field, you should ensure that your person records are associated to a company either using contact conversion in your CRM, or using the externalCompanyId field."

So you can definitely tie a Custom Object to a Company - as seen in your screenshot. And you will see this Custom Object on the detail pages of all Contacts that Salesforce lists under that Account, same as a Smart List with the filter "Has Custom Object X" will return all these contacts.

View solution in original post

6 REPLIES 6
Ajay_Mamgain2
Level 3

Re: Setting up a many-to-many relationship with Custom Objects

Hi Tom,

Marketo is a bit different in that way from Salesforce it doesn't have the concept of Account object it's only lead which can be linked with the custom object. So whenever new lead comes you need to update the custom object data either using API or manually. 

Tom_liolios2
Level 1

Re: Setting up a many-to-many relationship with Custom Objects

Hi Ajay,

 

Thanks for your reply. I'm a bit confused though. Marketo suggest to link to the Company Object:

Tom_liolios2_0-1591193895023.png

 

Company does not appear under the list of Custom Objects, so I assumed it was a standard Object. If Company is not a default Object in Marketo, what is it then? And how does it 'relate' to the Person Object?

 

Thanks for the help so far!

Michael_Florin
Level 10

Re: Setting up a many-to-many relationship with Custom Objects

Just  for clarity on your phrase "not all person records with the same Company ID": If you link a Custom Object to a Marketo Company Object, only Contacts are being associated with the CO. If you happen to have Leads in Salesforce that are underneath Salesforce Accounts, these would not show up.

Tom_liolios2
Level 1

Re: Setting up a many-to-many relationship with Custom Objects

Hi Michael,

 

Thanks for your response. I assumed it was possible to update the Company Object, regardless of the Person Record. But if I understand you correctly, it's only possible to update data on a Person level?

 

Thanks!

 

 

Michael_Florin
Level 10

Re: Setting up a many-to-many relationship with Custom Objects

Hey Tom,

 

I don't think I said that. 🙂

https://docs.marketo.com/display/public/DOCS/Understanding+Marketo+Custom+Objects#UnderstandingMarke...

Here's the passage I was referring to. It hides in this sentence:

"Custom Objects can only directly link to a single record. This means that when your custom object type is linked by company field, you should ensure that your person records are associated to a company either using contact conversion in your CRM, or using the externalCompanyId field."

So you can definitely tie a Custom Object to a Company - as seen in your screenshot. And you will see this Custom Object on the detail pages of all Contacts that Salesforce lists under that Account, same as a Smart List with the filter "Has Custom Object X" will return all these contacts.

Tom_liolios2
Level 1

Re: Setting up a many-to-many relationship with Custom ObjectsT

Hi Michael, thanks for the explanation. We've built a custom Salesforce integration, so I will have to see how it exactly works. But this actually clears up my confusion 👍