Certain features in LeadConduit support variable substitution. This allows you to use lead data and system fields in the configuration for those features. Any value wrapped in #{...} will be considered a variable and an attempt will be made to substitute the entire expression (including the # symbol and braces) for a variable value. You use an unknown variable name, no substitution can be made and the "#{...}" value will simply be removed. In other words, an unknown variable is replaced with an empty string.
System Field Variables
leadId=#{xxLeadId}&date=#{xxDateCollected}
leadId=1234&date=2008-10-12
Variable Name | What is it? |
---|---|
#{xxLeadId} | The lead's identifier |
#{xxCampaignId} | The campaign's identifier |
#{xxAccountId} | The account ID of the party that submitted the lead |
#{xxSiteId} | The site ID of the site that submitted the party. The site is owned by the party that submitted the lead. |
#{xxLeadSourceId} | The identifier of the immediate lead provider (which may be different than the originating affiliate) |
#{xxLeadSourceName} | The name of the immediate lead provider (which may be different than the originating affiliate) |
#{xxEntityId} | The identifier of the originating affiliate (the same provider has the same entity ID across all campaigns) |
#{xxDateCollected} | The date the lead was collected (in the YYYY-MM-DD format) |
#{xxDateCollected.utc} | The date the lead was collected, adjusted for UTC (in the YYYY-MM-DD format) |
#{xxDateTimeCollected} | The date and time the lead was collected (in the YYYY-MM-DD HH:MM:SS format) |
#{xxDateTimeCollected.utc} | The date and time the lead was collected, adjusted for UTC (in the YYYY-MM-DD HH:MM:SS format) |
#{xxSourceLeadId} | If this lead was routed from another campaign, this is the identifier of the lead in the other campaign |
#{xxLeadStatus} | The disposition of the lead (more details on lead status) |
#{xxLeadStatusDetails} | Reject reasons |
#{xxTest} | If the lead is designated as a test lead, this will be 'true'; otherwise, 'false' |
Campaign field variables
LeadConduit provides all campaign fields as variables in order to include lead data. This is useful in the event that you want to create a string which contains lead data. Some examples which show how variable substitution can be used for lead delivery additional parameters:
Assuming an entity ID of "ABC", and three campaign fields called areaCode, exchange, and lineNumber:
affId=PROVIDER_#{xxEntityId}&phoneNumber=#{areaCode}-#{exchange}-#{lineNumber}
LeadConduit will produce the following additional parameters:
affId=PROVIDER_ABC&phoneNumber=555-555-1212
Any campaign field can be used in this way, but take note if you remove a field from the campaign. After having removed the areaCode field, for example, LeadConduit would start sending the following additional parameters:
affId=PROVIDER_ABC&phoneNumber=-555-1212
Notice that the areaCode is simply omitted from the additional parameters and as a result there is a dangling hyphen in the phone number. In order to correct this behavior, you must adjust your additional parameters to:
affId=PROVIDER_#{xxEntityId}&phoneNumber=#{exchange}-#{lineNumber}
...which would result in the correct additional parameters:
affId=PROVIDER_ABC&phoneNumber=555-1212
Campaign field component variables
Field component variables are an advanced variable substitution feature which can be used to pull apart values that arrive in LeadConduit. If you wanted, for example, to separate a the homePhone field into area code, exchange and line number you could specify the following additional parameters expression:
areaCode=#{homePhone.area}&exchange=#{homePhone.exchange}&lineNumber=#{homePhone.line}
In order for this expression to work as expected, your homePhone campaign field must be defined as a "Phone Type" on the field editor screen in LeadConduit. Component variables are not available for generic field types like "Text" and "Text - List" because those field types don't give LeadConduit enough information about what type of value to expect. Using specialized field types, on the other hand, gives LeadConduit a hint about what sort of data the field holds.
The following component variables are available for use in additional delivery parameters. Remember that each component variable name must be prefixed with the campaign field name. Using #{year} will not work, but #{dob.year} will.
Field Type | Component Variable Name | Description |
---|---|---|
Phone | area | The first three digits of the telephone number |
Phone | exchange | The second three digits of the telephone number |
Phone | line | The last four digits of the telephone number |
Phone | extension | The extension number |
Date, Date of Birth | month | The numeric month of a date value (1-12) |
Date, Date of Birth | day | The numeric day of the month of a date value (1-31) |
Date, Date of Birth | year | The numeric four-digit year of a date value |
Debt Amount | min | The numeric minimum of a debt amount value range ("10000" for the value "$10,000 - $20,000") note: single value (non-range) Debt Amount inputs also have min, ave & max available. |
Debt Amount | max | The numeric maximum of a debt amount value range ("20000" for the value "$10,000 - $20,000") |
Debt Amount | ave | The numeric average of a debt amount value range ("15000" for the value "$10,000 - $20,000") |
Street Address | streetnumber | The first portion of the street address, up to the first blank ("123" for the value "123 Main St.") |
Street Address | streetname | The second portion of the street address, after the first space ("Main St." for the value "123 Main St.") |
Zip Code | zip | The first 5 digits of a zip code (i.e. "90210" for the value "90210-1234" or the value "90210") |
Zip Code | four | The last 4 digits of a zip code (i.e. "1234" for the value "90210-1234") |
Zip Code | locality | The locality of the zip code - "usa", "uk", "canada" |
State | abbr | The two letter state abbreviation, always uppercase (i.e. "TX" for the state of Texas) |
State | name | The full state name, always capitalized (i.e "Texas" for the state of Texas) |