How to tie Custom Objects and Companies?

Scott_Horner
Level 2

How to tie Custom Objects and Companies?

We do not have CRM synch, but we do have access to the API. We have created a custom object with many company fields and have one field as the link field which is linking to Company >> ID. We are trying to figure out the process of uploading our leads into Marketo, tying those leads to companies and then tying those companies to the custom object. From what I have gathered, the order of operations should be:

  1. Upload contacts (leads) via csv upload with all pertinent data, including company information. External Company ID is not being populated, even though we have included and mapped our data to this field. Is this an API / CRM synch only field?
  2. Upload Custom Object Data, making sure to map our companyID to the link field.

This is where we get stuck. Is the next step to tie the lead and company via the API? If so, will the custom objects then automatically make the tie to the company record? Or is this not the correct order?

10 REPLIES 10
Grégoire_Miche2
Level 10

Re: How to tie Custom Objects and Companies?

Hi Scott,

In Marketo, the data schema is not fully relational. It is closer to a star model in which the lead table is the center.

This means that the lead - company link is a 1-n by default. This means that one lead can have multiple companies and that the company object needs to have a lead id field to link it to the field. This obviously not what you intend to do, as I understand that what you would like to have each companies having multiple leads.

So you will need to use a n-n model with a joint table to link the leads to companies. This means a "lead role" table that links to the lead on one end and to the company on the other.

The limit of this is that you will not be able to use a 3rd custom object linked to companies, because AFAIK, the Marketo data model for the moment is only limited to 2-levels depth.

-Greg

Scott_Horner
Level 2

Re: How to tie Custom Objects and Companies?

Hi Greg,

Thanks for the reply. We do intend to have a 1 - n relationship between lead and company. As I understand it, the company could also have a 1 - n to custom objects, with External Company ID and the link field we designated for the company link in the custom object. I am sure I didn't explain my question very well as this is all new to me, but I am trying to figure out how to make that tie between the custom object and company.

Grégoire_Miche2
Level 10

Re: How to tie Custom Objects and Companies?

Hi Scott,

Yes, you are correct you can have 2 custom objects, company and another one, and link them together in a 1-n relationship, as you describe.

But without any link to the lead object, these 2 will be useless in Marketo.

May be you can explicit a little bit more what you are trying to achieve.

-Greg

Scott_Horner
Level 2

Re: How to tie Custom Objects and Companies?

We have many online B2B Directories in which a company can be associated to. We are wanting to store specific attributes about that company / directory relationship such as is this company an advertiser in this directory, what advertising package do they have, what is the name of that directory, what is the URL of that directory, etc. So a company can be in many of our directories and we may send an email with information specific to that directory.


When we created a custom object and added a link field called companyID. We chose Company as the Link Object and was presented with only one value for the link field which was Id. I assumed that this was referring to External Company ID as I was thinking that when we initially imported leads into Marketo, we would have that External ID field populated with our companyID, then in the custom object link field called companyID we would have the same ID and this would create the tie.

Grégoire_Miche2
Level 10

Re: How to tie Custom Objects and Companies?

HI Scott,

In Marketo, the lead and account (company) object are in fact tightly joined. Although Internally, these are 2 different objects, they cannot really be addressed separately and admins can only add fields to the lead object. So there is an implicit 1-1 link between lead and account.

If I understand the model you would like to implement, it is:

Lead n-1 company 1-n directory entry.

But the issue is that you cannot create a "company" field.

You have 2 solutions in fact:

  1. You create only 1 custom object, called "directory entry "and you link it to the lead, instead of the company. The pros is that the model is quite simple, but the cons is that you will have to duplicate entries in this object for each lead in the company.
  2. You create 2 custom objects. the first one is "directory entry" and has it's own unique ID field. for instance companyID. The second objet is a link object that has 2 link fields: one is the lead ID and the other is the company ID. This one will have to be instantiated for each lead in a given company. And you will have to manage insertion of data in this object as many times as necessary.

-Greg

Scott_Horner
Level 2

Re: How to tie Custom Objects and Companies?

I tried option 1 and I think that is going to work for us. How do we get the custom object fields to show in the smart list filters to filter against?

Grégoire_Miche2
Level 10

Re: How to tie Custom Objects and Companies?

HI Scott,

You cannot see the custom object fields. You get a "has Directory" filter and in this filter, all the Directory fields will be usable as constraints.

-Greg

Scott_Horner
Level 2

Re: How to tie Custom Objects and Companies?

So the fields that are added in the custom object can't be accessed as a token to pull into an email?

Grégoire_Miche2
Level 10

Re: How to tie Custom Objects and Companies?

Hi Scott,

Not as simple tokens. But through email script tokens, yes, it is possible.

-Greg