Query Parameters

How to provide lead enrichment data to Spara.

Including lead enrichment data as query parameters ensures a better buying experience and higher conversion metrics. This applies to any deployment scenario. By supplying Spara with this information you ensure that Spara will a) not attempt to recapture this data, and b) may modify its behavior to better suit each conversation.

For example, let’s deploy Spara’s Full screen interface immediately after a marketing web form that captures a lead’s email address and company size. Spara is loaded with the URL below, which includes the lead’s email address and company size.

https://app.spara.co/chat/<app_id>?lead_company_size=50&[email protected]

Because Spara is loaded with this information, Spara will not try to recapture the lead’s email address and will tailor its behavior to speak to a small business owner.

Spara supports the following query parameters by default. All parameters are strings.

Query Parameter
Notes

lead_email

The lead’s email address. This parameter is used to match Salesforce records.

lead_salesforce_id

The ID for this lead’s matching Salesforce Lead object. This parameter is used to match Spara data to Salesforce records.

lead_first_name

The lead’s first name.

lead_last_name

The lead’s last name.

lead_phone_number

The lead’s phone number.

lead_job_title

The lead’s job title.

lead_company_name

The name of the lead’s company.

lead_num_employees

The employee count of the lead’s company.

Spara automatically reads any query parameter prepended with lead_. But you can configure Spara to read any query parameter.

Mapping Query Parameters

In some cases, you may wish to map arbitrary query parameters for Spara to ingest. In this case, add the following JavaScript snippet into your <head> tag just below your installation snippet. You may define any arbitrary key/value pairs in queryParameterMap.

<script type="text/javascript" src="https://app.spara.co/embed-[app_id].js"></script>
<script>
  // This example enables Spara to read Email and Employee_count__c query parameters
  // as lead_email and lead_company_size, respectively.
  // You may add any arbitrary key/value pairs to queryParameterMap.
  Spara = {
    queryParameterMap: {
      "Email": 'lead_email',
      "Employee_count__c": 'lead_company_size',
    },
  };
</script>

Last updated