Answered

Salesforce Custom Object link to Contact

  • 24 January 2023
  • 6 replies
  • 513 views

Hi. My question is exactly like this one, which was not answered? How to map a hidden field to a master-detail field? | Community (typeform.com)

We have survey responses form, mapped to a custom object in Salesforce. This is easy enough given the online instructions which are great (One day new with Typeform) 

What I am unable to figure out, how to connect the custom objects created from the survey form to the respective contacts in SF? That is, for the child object (custom object) to link to the master object (contact). From what I can tell we could pass a hidden SF_Contact_ID or even use the email address of contact - but where in the form mapping to SF do we indicate this is the field to “link” the custom object to the Contact using the SF_Contact_ID or email?

At first, I thought it would involve two mappings. 1. Contact - just using the field to match to existing, then a second mapping 2. The survey responses to the custom object - but no joy, the Contact mapping requires surname, etc… - where we just want it to update existing. Actually, not update anything, just find existing contact based on the id or email. 

Another way to ask this question, when mapping a form to a custom object in SF - how do you tell SF which master record (Account or Contact) the custom object belongs to? Again, I can see with SF_ID, Email, or any unique field could be passed - what where to map this so it is used to lookup the master record, in order to add the new custom object?

A SF workaround would be to map all the fields, including the unique id to the response, with a SF test id as a static field to populate the contact id, since it is required. Then use Flow, using the unique id to find the correct contact record, replacing the Sf test id OR mapping everyting to a staging object. Either way, both of these work arounds will take some effort for what I assume is possible, I am just missing someting?

Thanks in advance.

icon

Best answer by ToddM 26 January 2023, 22:36

View original

6 replies

Userlevel 7
Badge +5

Hi @ToddM I’m asking our tech team about this! I’ll post back here when I have a bit more information. 

Userlevel 7
Badge +5

Hi again, @ToddM ! Are you trying to map to a lookup field? If so, I’m afraid this isn’t supported with our integration. You can read more about this here

Thanks for the response. This can be done with a Salesforce Flow. 

 

In short,

  1. Have the unique_id (SF_ID or email) map to the custom object. 
  2. Just use a temp fake Contact/Account ID to save the custom object.
  3. Flow trigger on new custom object creation, Flow to search for existing Contact/Account using the unique_id or email address, replace the temp fake Contact/Account.

So a easy workaround exist within Salesforce for using the lookup field.

 

Thanks again!

Userlevel 7
Badge +5

Ah, thanks for letting us know, @ToddM ! Glad to hear that works for you. 

Hi @Liz, 

 

I am trying to do the same thing that @ToddM was originally asking for.

 

I was wondering if there have been any developments since this question was posted?

 

Also unfortuanly fairly new to SF so dont really understand the work around.

 

Many thanks

Userlevel 7
Badge +5

@ToddM might be able to provide some insights on their workaround for you, @Michelle SF !

Reply