Look Up an Account Record with Contact Details 


In this Article
Related Articles

About this Article

Looking up an account object in Salesforce can often be difficult as users rarely know their account ID and, if they do know their account name, they might misspell it or use an abbreviation, which would cause it not to be recognized. Because of this, it is often easier to lookup an account object by going through the contact object first.

Using the Salesforce Prefill Connector, which is available for Premier and Enterprise users, you can prefill your forms with user information that you have stored in Salesforce.  If you are not a Premier or Enterprise user, you can also use the second method outlined below to perform prefilling operations.

In order to prefill from a Salesforce object, you first have to find that object by performing a "lookup" in our connector. For this article, we will focus on how to lookup an account object, but these tips can also be applied to other object types.

Aside from a user typing in their Salesforce account ID, there are two ways to successfully lookup an account object:

  1. Use a related object (such as a contact object)
  2. Send a customized link to your users with their Account ID (Can be done without the Salesforce Prefill Connector as well)
Note: If you are unfamiliar with the basics of prefilling, including unsafe query parameters, you should start by watching our class on the Salesforce Prefill Connector.

In Salesforce, any contact object that is associated with an account object will have that account name and ID stored within it. Because of this, we say that the two objects are related.

If we have a user's contact information, such as their email or last name, we can use that to lookup their contact record and then use that contact record to lookup their account, as long as the two are related.

This process allows you to prefill information from a user's account record, even though the user might not know their account ID or any type of identifying information from their account.

To create a prefilling lookup like this, begin in the Salesforce Prefill Connector by adding a contact lookup. We will be using an email lookup for this example, with an unsafe query parameter of "email."

Once you have configured your lookup, you'll need to map any fields from the contact object that you would like to prefill. At the very least, you will need to map the Account ID in this step so that the connector is pulling in that information.  You can map the account ID to a hidden field in the form, that way the user will not have to interact with it, but it can be stored for later use.

Next, you're ready to add your account lookup. This can be dependent on the first lookup or created as a separate object, either will work in this scenario. For the lookup, set Account ID equal to a value from above: Contact.AccountID

Note: If you're not seeing the Contact.AccountID value as an option, that means it was not mapped in the contact lookup above

You can now finish configuring your connector by mapping any account fields that you would like to prefill. When you're finished, make sure you save the connector

Once your connector has been configured, your users can access the prefilled form by a login page or by a customized prefilling link, both of which are explained in detail in our class on the Salesforce Prefill Connector


Send a Customized Link to your Users

If your Salesforce contacts do not know their account ID, and you want to prefill account record information, the only other solution is to send them a customized link that contains their account ID. This is best done through a dynamic prefilling link that is created in your Salesforce email templates. If you are not a Premier or Enterprise user, you can still use this option for prefilling a form as it does not necessarily need to be run through the Salesforce Prefill Connector.

Note: This process is covered in more detail in our Prefilling Class at minute mark 14:15

To create this link, you will start with a typical prefilling link which is the form's URL, followed by a question mark and the query parameter that you have defined in your prefill connector:  If you are not using the prefill connector, the query parameter will be replaced by the field alias that you are wanting to prefill.

www.tfaforms.com/123?%%tfa_1%%=

Next, you'll want to go to your email templates page in Salesforce (Setup → Communication Templates → Email Templates) and create the template you're going to use for this message.

Finally, you can add your prefilling link into your template. After the equal sign, you'll want to use the Salesforce merge labels to add the Account ID. In the end, your link will look similar to this:

www.tfaforms.com/123?%%tfa_1%%={!Account.AccountID}
 
Note: It is recommended that you wrap or embed your link inside of text. This will help prevent the link from breaking when it is sent out.

Now your link is ready to be sent out to your contacts and it will automatically and dynamically be filled with their account ID.


Video Tutorial

This video tutorial will show you how you can use the prefill connector to look up an account record by using the Account ID associated with a contact record. This can be useful when you're wanting to prefill information from an account record, but all you or your user has access to is information that can be used to lookup a contact record.

Terms of Service · Privacy Policy