Prerequisites
Prepare these values before you start:WORKSPACE_IDSEQUENCE_IDfor the sequence you want to enroll contacts intoSALESFORGE_API_KEY- the contact filters or contact IDs you want to use
Authorization header:
Select contacts
You must provide at least one contact filter or setlimit to a number greater than zero.
Available contact filters
Available contact filters
- Contact IDs:
leadIds,notInLeadIds - Tag IDs:
tagIds,notInTagIds - Email service providers:
esps,notInESPs - Custom variable values:
customVars,notInCustomVars - Custom variable IDs:
customVarIds,notInCustomVarIds - Contact search:
searchQuery - Email validation:
validationStatuses,validationRunId - Contact state:
excludeContacted,hasValidLinkedIn,hasEmail
limit to set the maximum number of contacts the preflight checks.
Enrollment flow
1
Check the contacts
Create a preflight for the contacts you want to enroll.
POST /multichannel/workspaces/{workspaceID}/sequences/{sequenceID}/enrollments/preflight- Contact IDs
- Validation run
selectionScope controls which matching contacts are included:allincludes all matching contacts.in_sequenceincludes contacts with at least one enrollment that could produce a preflight decision: any enrollment in a draft sequence, or an enrollment with statusactive,paused,out_of_office,failed,company_limit_reached, orreplied.not_in_sequenceincludes contacts without one of those decision-producing enrollments. A contact whose only enrollments arecompleted,dnc,unsubscribed, orbouncedis included in this scope unless one of those enrollments belongs to a draft sequence.
selectionScope, it defaults to all.A
validationRunId must belong to the workspace, be completed, and contain at least one contact. If you also provide leadIds, the API keeps only contacts present in both selections.2
Read the result
The response shows how many contacts can be enrolled and which contacts need a decision:
A contact may appear in more than one move group. For that reason, move-group contact counts may overlap.Save
preflightId for the next request. The preflight expires at expiresAt, 15 minutes after creation.3
Choose skip or move
Choose the action that matches what you want to do:
- Skip enrolls contacts that do not need a decision. It leaves the other contacts in their current sequences.
- Move enrolls eligible contacts in this sequence and updates their enrollment in the sequences you select.
sequenceId values from moveGroups. If a contact appears in several required groups, select all of them. Otherwise, the API skips that contact.When a move is confirmed, a draft source enrollment is deleted. Any other selected source enrollment is set to completed, and its pending steps are canceled.4
Preview a move
This step is optional. It shows the expected result without changing any enrollments.You must set
POST /multichannel/workspaces/{workspaceID}/sequences/{sequenceID}/enrollments/preflight/{preflightID}/move-previewskipReplied:truedoes not enroll contacts that have replied.falseallows them to be enrolled if you selected all required sequences.
sourceCleanupCount is the number of contacts whose enrollment in another sequence will be updated. skipBreakdown shows whether contacts are skipped because they replied or because you did not select every required sequence.5
Apply the decision
Confirm the preflight with Preview returns expected counts. Confirmation returns the counts that were actually applied.
skip or move.POST /multichannel/workspaces/{workspaceID}/sequences/{sequenceID}/enrollments/preflight/{preflightID}/confirm- Enroll eligible contacts
- Move contacts
skipReplied is required for move. It is not required for skip.A successful response contains the enrolled contact IDs and the final counts:If the preflight changes or expires
Contact enrollments can change after you create a preflight. If this happens, preview or confirmation returns409 with message set to preflight_stale.
The data field contains a new preflight:
data.preflightId for the next preview or confirmation request.
An expired preflight returns 404. Create another preflight with the same contact selection. A 422 response with insufficient remaining active credits balance means confirmation would exceed the account contact limit. A 423 response with enrollment_confirmation_busy means another enrollment is being confirmed; try again after it finishes.
If a validation run is not ready
When you usevalidationRunId, the run must be completed and contain at least one contact.
