For the complete documentation index, see llms.txt. This page is also available as Markdown.

Salesforce Campaigns & Campaign Members

How Spara mirrors Salesforce Campaigns and Campaign Members, and how to use campaign membership and member status in workflow criteria.

A Campaign is a Salesforce marketing campaign, such as a webinar, a trade show, or an email program. A Campaign Member is one Lead's membership in a Campaign, along with that member's status (for example Sent, Registered, or Attended).

Spara mirrors both objects one way from Salesforce. Once they are synced, you can use campaign membership in workflow criteria: enroll every lead who registered for a webinar, branch on whether a lead attended, or keep a sequence away from leads already in another campaign.

Campaign sync is set up by Spara. Contact your Spara account team to turn it on and choose which Campaigns to sync. Campaigns are only supported for Salesforce.

How Campaigns Map to Spara

Salesforce object
Spara object
Relationship

Campaign

Campaign

Has many Campaign Members

CampaignMember

Campaign Member

Links one Campaign to one Spara Lead

CampaignMemberStatus

Campaign's statuses

The list of member statuses a Campaign defines

A Lead can belong to many Campaigns, and holds at most one membership per Campaign.

Campaign Fields

Spara field
Salesforce field
Description

Name

Name

Campaign name, shown in the workflow picker

Description

Description

Campaign description

Type

Type

Campaign type, for example Webinar

Status

Status

Campaign status, for example In Progress

Active

IsActive

Whether the Campaign is active

Start Date

StartDate

Campaign start date

End Date

EndDate

Campaign end date

Each Campaign also carries the member status labels defined on it in Salesforce (CampaignMemberStatus.Label), in Salesforce's sort order. These are the statuses you can pick from in workflow criteria.

Campaign Member Fields

Spara field
Salesforce field
Description

Lead

LeadId / ContactId

The Spara Lead the member resolves to

Status

Status

The member's status in the Campaign, for example Responded

How Sync Works

Which Campaigns sync. Spara syncs the Campaigns matched by a campaign filter, written as a SOQL WHERE clause on the Campaign object. The default is IsActive = true. Every Campaign Member of a matched Campaign syncs with it. Some example filters:

How members resolve to Leads. A Campaign Member points at either a Salesforce Lead or a Contact. Spara matches it to the Spara Lead linked to that Salesforce record. When a member carries both (a Lead that has been converted to a Contact), the Contact wins.

Members create Leads. If no Spara Lead exists for a member yet, Spara creates one, even if your Lead and Contact Import Rules would not import that record. Adding someone to a synced Campaign is enough to bring them into Spara.

Timing. Changes made in Salesforce reach Spara every few minutes, including new Campaigns, new members, status changes, and deletions. A full resync also runs nightly to catch anything missed. Removing a member or a Campaign in Salesforce, or a Campaign no longer matching the filter, removes it from Spara.

Read-only. Spara never writes Campaigns or Campaign Members back to Salesforce.

Salesforce Permissions

The Salesforce user that Spara connects as needs read access to the Campaign, CampaignMember, and CampaignMemberStatus objects. If it can't read them, campaign sync is skipped and the rest of the Salesforce integration keeps working.

Using Campaigns in Workflows

Once campaign sync is on, a CRM Campaigns field appears in the field picker for workflow triggers and Condition steps. Its options are your synced Campaigns, listed by name.

Operator
Matches a lead who

is any of

Is a member of at least one of the selected Campaigns

is none of

Is a member of none of the selected Campaigns

is defined

Is a member of any synced Campaign

is not defined

Is not a member of any synced Campaign

Filtering by Member Status

With is any of or is none of, a with status picker appears next to the Campaigns you selected. It lists the member statuses those Campaigns define. Pick one or more to count only memberships with those statuses; leave it on Any status to count every membership.

The status is checked on the same membership as the Campaign. A lead who is Attended in Campaign A and Sent in Campaign B does not match CRM Campaigns is any of B with status Attended.

Examples

Follow up with webinar attendees. Trigger a workflow on:

Re-engage registrants who didn't show. Trigger on the same Campaign with the status that marks no-shows in your org, for example Registered.

Keep leads out of overlapping programs. Add a second criteria row so leads already in a nurture don't also get the event follow-up:

Branch inside a workflow. In a Condition step, route is any of "Q4 Product Webinar" with status Attended to a thank-you email and use a catch-all branch for everyone else.

Enrolling Existing Leads

As with any trigger, a lead enters a workflow once. A lead who later changes status or leaves the Campaign stays in the workflow; use a Condition step to check membership again before a step that depends on it.

Using a Campaign's Details in Messages

When a workflow's trigger filters on exactly one Campaign, that Campaign's details are available as variables under This Workflow in the step editor's variable menu:

Variable
Value

{{ workflow_campaign_name }}

The Campaign's Name

{{ workflow_campaign_description }}

The Campaign's Description

Use them in Send Email, Send Text, Notify, and Prompt steps, for example Thanks for registering for {{ workflow_campaign_name }}.

The email channel that answers the workflow's emails can use the same variables in its AI Instructions. When a lead replies to one of the workflow's emails, the reply sees the Campaign the workflow filters on. On any other email thread, the variables are blank.

A Campaign's description comes from Salesforce. If you add or edit it there, Spara picks it up within a few minutes.

FAQ

Can I sync HubSpot or Marketo campaigns?

No. Campaign sync is Salesforce only.

Why doesn't a Campaign appear in the workflow picker?

It doesn't match your campaign filter (for example, it is inactive and the filter is IsActive = true), or it was created in the last few minutes and hasn't synced yet. Ask your Spara account team to adjust the filter if you need more Campaigns.

Why don't I see the member status I want?

The status picker lists the statuses defined on the Campaigns you selected in that row. Select the Campaign first, then the status. If a status was just added in Salesforce, it appears after the next sync.

Will Spara add leads to Campaigns or update member statuses?

No. Campaigns and Campaign Members are read-only in Spara. To record campaign activity in Salesforce, use a CRM API step.

Last updated