Business Problem
Marketing and Sales Operations repeatedly need to find an existing Campaign, resolve a
Lead or Contact by email, and create or update membership correctly. Repeating this
logic manually introduces errors and can create duplicate people or Campaign Members.
Solution
Built a Flow-first core that works independently of Agentforce. An optional internal
Campaign Operations Agent invokes the same orchestration Flow, with explicit
user-confirmation rules for Lead creation and Campaign Member status updates.
Architecture
Two independently deployable layers: the Campaign Automation Core (Flows) and an
optional Agentforce layer that calls the same orchestration Flow and adds no business
logic of its own.
Internal user or calling Flow
JB_Add_Person_To_Campaign
JB_Resolve_Person_By_Email
JB_Ensure_Campaign_Member
Deterministic outcome code
What Was Built
- JB_Resolve_Person_By_Email: resolves existing Contacts first, then Leads.
- JB_Ensure_Campaign_Member: checks membership and avoids duplicate Campaign Members.
- JB_Add_Person_To_Campaign: orchestrates existing-Campaign lookup, person resolution, and membership actions.
- JB_Campaign_Operations_Agent: optional Agentforce interface with guarded mutation confirmation and result-grounded responses.
Kit Expansion
After the release candidate, the Core library gained more reusable building blocks:
JB_Create_Follow_Up_Task: creates a follow-up Task for a Lead or Contact, with configurable owner, subject, priority, due date, description, and related record. Duplicate checks stay with the calling Flow.
JB_Notify_Internal_Users: sends a Salesforce custom notification to an internal user; the calling Flow chooses the notification type and recipient.
- JB Marketing Follow-Up: a custom notification type shipped with the Kit for these alerts.
- Like the rest of the Core library, both subflows return deterministic result codes, are active in the development org, and have their own Apex test classes.
Buying Signal extension (experimental)
An experimental extension connects Data 360 (formerly Data Cloud) to the same building
blocks. It is not production-complete.
- A Data 360 Calculated Insight,
JB_Buying_Signal_Score__cio, flags sales-ready people; a Data 360-triggered Flow passes each sales-ready row to the JB_Handle_Buying_Signal worker.
- The worker resolves the Lead or Contact, ensures Campaign membership with a Sales Ready status through
JB_Ensure_Campaign_Member, and creates or refreshes a single open follow-up Task, so reruns don't create duplicates.
- The worker has been debug-verified for one Lead. The Data 360 trigger has not yet been confirmed firing end to end for a sales-ready record.
Validation
The three Core Flows were deployed and active in a development org. Two Apex test
classes passed 23 tests. The Agentforce authoring bundle was published as Bot Version
5, but remained inactive pending further evaluation. Pass counts for the newer
subflows' test classes aren't stated here because they weren't re-run for this case
study.
Status & Limitations
The accelerator handles membership in existing Campaigns; it does not create Campaigns
or Contacts, guess Campaign names, or silently reconcile duplicate records. Known
Agentforce topic-selector routing inconsistencies remain under investigation. This
work is a documented development release candidate, not a live customer
implementation. The Buying Signal extension is experimental and not yet verified end
to end.
Why It Matters
Separating reusable business logic from the conversational interface allows teams to
use the same tested subflows from forms, other Flows, and agents rather than rebuild
membership logic for every campaign.