Salesforce Destination

Overview

The Salesforce destination writes evaluation results to your Salesforce Lead, Contact, and Account objects. TrailSpark maps scores, reasoning, and evaluation dates to custom fields you define in Salesforce.

Prerequisites

  • Salesforce integration connected (Settings > CRM Integration > Connect tab)
  • Custom fields created in Salesforce for TrailSpark data
  • Admin or Owner role in TrailSpark
  • Field-level security in Salesforce allowing write access

Custom Fields in Salesforce

Create these custom fields on both the Lead and Contact objects:

Field LabelSuggested API NameData Type
TrailSpark ScoreTrailSpark_Score__cText (values: hot, warm, cold)
TrailSpark Evaluation DateTrailSpark_Evaluation_Date__cDateTime
TrailSpark ReasoningTrailSpark_Reasoning__cLong Text Area

For account propensity, create on the Account object:

Field LabelSuggested API NameData Type
TrailSpark PropensityTrailSpark_Propensity__cText (values: high_propensity, medium_propensity, low_propensity)

Configuration

Go to Settings > CRM Integration > Destinations tab.

Destination Settings

  • Send Evaluations to Salesforce -- Toggle to enable/disable the destination
  • Salesforce Integration -- Select which connected Salesforce instance to use
  • Create Records if Not Found -- When enabled, TrailSpark creates new Lead or Contact records if no match exists. You can filter which score levels trigger creation (Hot, Warm, Cold)

Field Mapping

The field mapping section has two tabs: Lead Object and Contact Object. For each, map three fields:

TrailSpark FieldDescription
Score FieldWhere the evaluation score is stored
Evaluation Date FieldWhere the evaluation timestamp is stored
Reasoning FieldWhere the AI reasoning is stored

TrailSpark loads your Salesforce field metadata automatically. Select fields from the dropdown -- fields appear with both their label and API name.

Account Propensity Score

The propensity score card configures where account-level propensity (high/medium/low) is written:

  • Account Propensity Field (primary) -- Written to the Account object when a linked Account exists
  • Lead Propensity Field (fallback) -- Written to the Lead object when no Account is linked

Both fields are optional.

Dual-Object Support

Salesforce stores people as Leads (unconverted) and Contacts (converted). TrailSpark matches by email address and writes to whichever object the lead exists on. You configure field mappings independently for each object.

Troubleshooting

IssueResolution
Field not in dropdownVerify the field exists on the correct object and field-level security allows API access
Data not writingCheck that the destination is enabled, integration is connected, and no Salesforce validation rules are blocking the update
Wrong record updatedReview duplicate records in Salesforce -- TrailSpark matches by email

Next Steps