> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.metalocator.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Capturing Leads in Salesforce

To enable this feature, reference the following settings under the Lead Generation tab of the Interface Builder.

[![](https://storage.crisp.chat/users/helpdesk/website/-/a/6/f/b/a6fb98588212d000/3193fa35-a9ab-4220-a048-97cfc7_hggrhh.png)](https://downloads.intercomcdn.com/i/o/254036902/66aeda5a43ed8bf7117e65c6/image.png?expires=1794512700&signature=6995c12d7a228a81a6b53aa1c3e898076111b77402ba30c11c3b4bcbac142f01&req=diUjFsp4lIFdFb4f3HP0gLDxEeGSHMFUW453JaoV3KgtkGzPC%2BPTRthqDJtj%0AtV5Op%2BoXYEdxBLIlug%3D%3D%0A)

First set Enable SalesForce Leads to "Yes", then add your Salesforce-provided Organization ID (OID).

To obtain your SalesForce OID, log into SalesForce and go to Setup > Administer > Company Profile > Company Information.

[![](https://metalocator.intercom-attachments-1.com/i/o/254038695/5dcbf0ced35297f198acfb0e/http-3A-2F-2Fwww.metalocator.com-2Fwp-content-2Fuploads-2F2015-2F12-2Fsalesforce_oid-300x127.png?expires=1794512700&signature=bf79365121f3d35c5b852defcbb8fe0cb1082c1bc70d08e8a730c76c99ff3f19&req=diUjFsp2m4haFb4f3HP0gEh3%2FnqubvECC3kLbObiM%2BFIYd%2FEPLpnaDeudJXR%0Acu3wJtQ7260%2FgIjEQQ%3D%3D%0A)](https://storage.crisp.chat/users/helpdesk/website/-/4/5/d/1/45d104e935bba400/4158ec91-5a7f-4cb2-9be1-aa99c5_14q43mk.png)

Leads submitted via the store locator interface will now appear within SalesForce as Leads, as shown here:

[![](https://metalocator.intercom-attachments-1.com/i/o/254038696/d17c7a7f13998805c55448ae/http-3A-2F-2Fwww.metalocator.com-2Fwp-content-2Fuploads-2F2015-2F12-2Fsalesforce_leads-300x113.png?expires=1794512700&signature=934d603d6e158db864bf52473f099a66f4886c5929f516cd5ecbdbd0f4d1728f&req=diUjFsp2m4hZFb4f3HP0gJUTZO0Xnh6PTB%2FDMUOX98DIxPncMG7fpJZrSSgn%0AedjWpIfDvKx2%2FSZnMg%3D%3D%0A)](https://storage.crisp.chat/users/helpdesk/website/-/5/6/5/3/5653e2988dae8400/0072b2d0-092d-44dc-aee5-83d880_srxhga.png)

To customize the fields that appear in MetaLocator, provide a SalesForce URL Template similar to the following

`https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8&last_name={last_name}&first_name={first_name}&email={from}&description={message}&00No0000002vITY={custom1}`

The template should be a single line, with no line breaks. It should always begin with:

`https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8`

MetaLocator will insert the OID automatically from the setting above.

The query string should be a series of pairs which set the SalesForce field name to the property value from the [Lead object](https://support.metalocator.com/en/articles/3059413-webhooks-in-metalocator).

Using the [Interface Builder template editor,](https://support.metalocator.com/en/articles/3817982-field-templates) you can also insert your own custom fields into the form by adding a custom field, and modifying the HTML to create a hidden form field which can be set to any dynamic data element from the template objects.

[![](https://storage.crisp.chat/users/helpdesk/website/-/c/5/d/d/c5dd30b3816aa000/14df8b61-0b16-4dd0-a7d9-dce351_mg75wz.png)](https://downloads.intercomcdn.com/i/o/254037963/a57492922d4facbb4b56346e/image.png?expires=1794512700&signature=58dace7864b7704e3a4d2dd1a9034e85468495cfa099b3f45acb611eccf73916&req=diUjFsp5lIdcFb4f3HP0gJR1C5Q%2FsCiZAEPXYX2xW12vgxahLKpsHVErNDEP%0AZ%2Fmi7VprZ55jy6WJ9w%3D%3D%0A)

In the below example, we create a template with a hidden variable set to the location name.

[![](https://storage.crisp.chat/users/helpdesk/website/-/e/e/8/a/ee8a48b5d51d4800/93920411-d0ce-4e97-8118-3dc310_1kki1aq.png)](https://downloads.intercomcdn.com/i/o/254038850/7a4c87509d399a7b5827dfe1/image.png?expires=1794512700&signature=58dba8ea593a57016e7bcd6cde38542545ecdb056e9aae46a3c08dc2b4f481a2&req=diUjFsp2lYRfFb4f3HP0gExXjfjSYikyVk71mRMQnpaTfPDbcVQjvIt5PlSg%0AF0dtB5f1S2nucu3pPg%3D%3D%0A)

This will be "posted" with the form and can be used in the Salesforce URL Template as:

`&00No0000002vITY={custom1}`

Where `00No0000002vITY` is the [SalesForce Field ID](https://createform.com/support/salesforce-fields) where you want to store the location name.

Using _custom1_, _custom2_ and so forth (up to _custom40_) ensures the values are also saved in the MetaLocator lead database. You can prevent storage in MetaLocator by using an organizationally namespaced field such as my_custom1, or whatever unique field value is appropriate which also doesn't overlap with the MetaLocator field object names.