LeadConduit by ActiveProspect

Variable Placeholders


  

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

LeadConduit provides a number of system field variables that you may use for substitution.  For example, if you were configuring additional parameters for lead delivery and you wanted to send the lead's LeadConduit identifier and the date the lead was collected in LeadConduit, you would use the following expression:

leadId=#{xxLeadId}&date=#{xxDateCollected}

Assuming the lead's identifier is "123", and it was collected on 10/12/2008, this expression would be interpreted and sent to your delivery destination as:

leadId=1234&date=2008-10-12

The following system level variables are available.  Notice that all system field variables start with 'xx'.

Variable NameWhat 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 TypeComponent Variable NameDescription
PhoneareaThe first three digits of the telephone number
PhoneexchangeThe second three digits of the telephone number
Phone lineThe last four digits of the telephone number
Phone
extension
The extension number
Date, Date of BirthmonthThe numeric month of a date value (1-12)
Date, Date of BirthdayThe numeric day of the month of a date value (1-31)
Date, Date of BirthyearThe numeric four-digit year of a date value
Debt AmountminThe 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 AmountmaxThe numeric maximum of a debt amount value range ("20000" for the value "$10,000 - $20,000")
Debt AmountaveThe 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 CodezipThe first 5 digits of a zip code (i.e. "90210" for the value "90210-1234" or the value "90210")
Zip CodefourThe last 4 digits of a zip code (i.e. "1234" for the value "90210-1234")
Zip CodelocalityThe locality of the zip code - "usa", "uk", "canada"
StateabbrThe two letter state abbreviation, always uppercase (i.e. "TX" for the state of Texas)
StatenameThe full state name, always capitalized (i.e "Texas" for the state of Texas)

IMPORTANT NOTE:  If you remove a campaign field from your campaign, you should probably remove its use from each destination.  If you leave it in place, then it will be substituted with an empty string, which may or may not be OK, depending on the requirements of the lead recipient.

Tags:
last updated 3/30/2010 12:37 PM