Skip to content

Flow and Agentforce Integration

Integrate Onboarded™ operations into your Salesforce Flows, Apex code, and Agentforce agents using invocable actions. Most of these actions can be called from a Flow, from Apex, or from an Agentforce agent's Topic. Get Onboarded™ Task Unlock Sections is intended for Agentforce agents only and requires the Onboarded™ Agentforce Access permission set. The two mapping lookup actions check for an Onboarded™ permission set (details below). The application provides invocable actions for three kinds of use cases:

  • Sync actions (Onboarded™ Data Sync, Invoke Onboarded™ API) — write data to or from Onboarded™.
  • Mapping lookup actions (Get Onboarded™ Object Mappings, Get Onboarded™ Field Mappings for Object) — read-only, and intended primarily to let an Agentforce agent discover what's mapped before attempting a sync.
  • Task action (Get Onboarded™ Task Unlock Sections) — read-only, lets an Agentforce agent or Flow discover which form sections on a completed task are eligible to be unlocked for re-completion.

Agentforce Overview

Agentforce agents are frequently invoked with no record context at all — answering a conversational prompt, not sitting on a specific Salesforce record — so an agent cannot assume it already knows which Salesforce object maps to which Onboarded™ object, or which fields are involved. The two mapping lookup actions exist to solve exactly this: call Get Onboarded™ Object Mappings first (no input required) to ground the agent on what's configured in this org, then Get Onboarded™ Field Mappings for Object to drill into field-level detail for one specific relationship before attempting a sync action.

Adding an action to an agent: In Agent Builder, open the agent's Topics, add a new Action, choose Apex, and search by the action's label (e.g., "Get Onboarded™ Object Mappings"). The action's description and each input/output field's description — both authored directly on the Apex class — are what the agent's reasoning engine uses to decide when and how to call it, so no additional configuration is required beyond adding it to the right Topic.

Access differs by action: Onboarded™ Data Sync and Invoke Onboarded™ API are not gated by an Agentforce check, so existing Flow-based automation keeps working for users who don't hold an Onboarded™ permission set. The two mapping lookup actions check for an Onboarded™ permission set (see the next note). Get Onboarded™ Task Unlock Sections is intended for approved Agentforce agents only and requires the Onboarded™ Agentforce Access permission set.

Authorization on the mapping lookup actions specifically: Both Get Onboarded™ Object Mappings and Get Onboarded™ Field Mappings for Object check that the running user (whichever user context the caller executes as — the Agentforce agent user, a Flow's running user, or an Apex caller) holds the Onboarded™ Admin, HR Representative, Integration, or Agentforce Access permission set, the same check already used to gate custom settings access. Each action's response includes an explicit Is Authorized field — when false, treat the absence of data as "not authorized," not "nothing is mapped." Get Onboarded™ Task Unlock Sections uses a different, stricter authorization model — see Onboarded™ Agentforce Access on the Permission Sets page.

Onboarded™ Data Sync Invocable

Action Label: Onboarded™ Data Sync

Syncs existing Salesforce records to Onboarded™ using your configured field mappings. This action reads data from Salesforce records and maps it to Onboarded™ API fields based on your mapping configuration.

ParameterRequiredDescription
Salesforce ObjectRequiredThe Salesforce object of the record to be synced (e.g., Contact, Lead, Account, Person Account)
Record IDsRequiredThe Salesforce Record IDs to sync. For Delete, provide the Onboarded™ IDs of the records to delete instead (see Delete Operations).
Sync OperationOptionalCreate, Update, or Delete (defaults to Update if not provided)
Onboarded™ ObjectOptionalSpecify the Onboarded™ object type (Employee, Employer, Client, etc.). Required when Account is used for both Person Account (Employee) and Business Account (Employer).

When to Use: Ideal for scenarios where a Salesforce record is created or updated and needs to be synced to Onboarded™. The application automatically handles field mapping based on your configuration, making this the simplest approach for standard sync operations.

Common Scenarios:

  • Record Created in Salesforce: Use operation='Create' to create a corresponding Employee/Employer/Client in Onboarded™
  • Record Updated in Salesforce: Use operation='Update' (default) to sync changes to existing Onboarded™ record
  • Record Deleted in Salesforce: Use operation='Delete' and pass the record's Onboarded™ ID (not its Salesforce ID) in Record IDs to remove it from Onboarded™. See Delete Operations.

Critical Requirement for Create Operations: When using Flows or Apex code to create records in your Onboarded account from Salesforce, you MUST configure the "id" field mapping with Sync Operation = "Bidirectional" for the target Onboarded object type (Employee, Employer, Client, etc.).

Why this matters: After Onboarded creates the new record, it generates a unique Onboarded ID (e.g., ee_abc123). The queueable job needs to write this ID back to your Salesforce record's Onboarded ID field. If the mapping is set to "Outbound" only, the queueable operation cannot update the Salesforce record with the newly created Onboarded ID, and future sync operations will fail because Salesforce won't know which Onboarded record corresponds to the Salesforce record.

How to configure:

  • Navigate to Onboarded Setup → Field Mappings tab
  • Locate the object section (e.g., Employee, Employer, Client)
  • Find the "id" field mapping row
  • Set Sync Operation to "Bidirectional"
  • Save your changes

Delete Operations Use Onboarded™ IDs

Behavior change for Delete: For Create and Update, Record IDs are Salesforce record IDs, and the application reads those records to build the request. For Delete, Record IDs must be the Onboarded™ IDs of the records to delete (for example emp_abc123, the value stored in your Onboarded™ ID field). Salesforce IDs are not accepted for Delete.

Why: Delete no longer reads the Salesforce record. It sends the Onboarded™ ID you supply straight to Onboarded™. This means:

  • The Salesforce record can already be deleted. Previously a Flow had to run before the record was removed so the Onboarded™ ID could be read from it. Now a Flow on a record-deleted trigger can pass the ID stored on the record (for example {!$Record.Onboarded_Id__c}, using your own Onboarded™ ID field) and it works even though the record is gone.
  • No id field mapping is needed for Delete. The "id" mapping is still required for Create and Update write-back, but Delete does not look it up. You still need the Salesforce object mapped to an Onboarded™ object and field mappings configured for that object.

Example — Record-Triggered Flow (Contact deleted):

  1. Trigger: Contact, A record is deleted, so {!$Record} holds the record's values, including the stored Onboarded™ ID.
  2. Add an Action element and search for "Onboarded™ Data Sync".
  3. Configure parameters:
    • Salesforce Object: Contact
    • Record IDs: the Onboarded™ ID stored on the record (for example {!$Record.Onboarded_Id__c}, or whichever field holds your Onboarded™ ID)
    • Sync Operation: Delete
    • Onboarded™ Object: Employee

What happens if a Salesforce ID is passed to Delete: The value is sent to Onboarded™ as-is. Onboarded™ does not recognize it and returns a 404 Not Found. The Flow itself still completes without an error, so the failure is visible only in the Onboarded™ Error Logs (see Error Logs), not in the Flow. After switching a Flow to Delete-with-Onboarded™-IDs, check the Error Logs for 404s to confirm the right values are being passed.

Other behavior to know:

SituationResult
A value in Record IDs is blankThe action returns an error ("Delete requires the Onboarded™ ID of each record to delete") and nothing is sent.
Onboarded™ returns 404 (unknown ID)The error is logged in the Onboarded™ Error Log. It is not retried, because retrying cannot help.
Onboarded™ is rate-limiting or erroringA temporary failure (429 or 5xx) is retried automatically through the Sync Queue, the same as other operations.
More than 100 IDs in one requestProcessed in batches of 100, with the remainder continuing automatically.
Onboarded™ IDs are case-sensitivePass the ID exactly as stored. Do not change its case.

Deferred Deletes: If the action cannot run immediately (for example during an inbound sync or when queueable limits are reached), a Delete is saved to the Sync Queue like other operations. The queued record's Record_Ids__c holds the Onboarded™ IDs for Delete rows. A queued Delete is only removed once Onboarded™ confirms it. A failed Delete stays in the queue with its error, and is never discarded as a success.

Upgrading from an earlier version: Any Delete rows already in the Sync Queue before this change hold Salesforce IDs, which Onboarded™ will not recognize. They will fail with a 404 and be logged in the Error Log rather than being silently dropped. Review and clear any such rows after upgrading, and update Flows that call Data Sync with Delete to pass Onboarded™ IDs.

Invoke Onboarded™ API: That action is unchanged. Its Delete already takes the Onboarded™ id in the payload.

Record-Triggered Flow Example — Contact Creation

  1. Create Record-Triggered Flow. Create a flow triggered when a Contact is created or updated.
    • Object: Contact
    • Trigger: When a record is created or updated
    • Entry Conditions: [Optional — add criteria if needed]
    • Optimize Flow: Fast Field Updates
  2. Add Action Element. Add an Action element and search for "Onboarded™ Data Sync".
  3. Configure Parameters.
    • Salesforce Object: Contact
    • Record IDs: {!$Record.Id}
    • Sync Operation: Create (for new records) or Update (for existing records)
    • Onboarded™ Object: Employee

Why Use This Approach: This invocable automatically reads the Contact record's fields and applies your configured field mappings. You don't need to specify which fields to sync — the application handles that based on your Field Mapping configuration in Onboarded™ Setup.

Agentforce Usage

Use this action when the agent already has a specific, existing Salesforce record in hand (e.g., the user is discussing a particular Contact, or the agent just looked one up) and wants to sync it using this org's configured field mappings — this is the action an agent should prefer over Invoke Onboarded™ API whenever a mapped record already exists, since it requires no knowledge of Onboarded™'s raw API field names.

Before calling this action, an agent with no prior context should call Get Onboarded™ Object Mappings to confirm the Salesforce object is actually mapped (and to resolve the Onboarded™ Object ambiguity case called out above for Account), rather than guessing and receiving a Sync_Object_NotMapped style error.

Asynchronous result caveat: A success result from this action (e.g., "Submitted N request(s) for processing") means the sync was accepted and queued or sent — it does not guarantee Onboarded™ has applied it yet. An agent relaying this back to a user should phrase it as "I've submitted that for sync" rather than "that's been updated in Onboarded™."

Invoke Onboarded™ API Invocable

Action Label: Invoke Onboarded™ API

Sends data directly to the Onboarded™ API using custom key-value pairs that you define. This action gives you full control over the API payload without relying on field mappings.

ParameterRequiredDescription
Onboarded™ ObjectRequiredThe Onboarded™ object type (e.g., Employee, Employer, Client, Job, Placement, Task). Must match the Onboarded™ API object name.
API ActionRequiredThe API operation to perform: Create, Update, or Delete
Key/Value Pairs CollectionRequiredA collection of the ApiKeyValuePair Apex-defined type representing the API payload. Keys must match Onboarded™ API field names exactly. See ApiKeyValuePair Class below for setup details.

Important: When using this action, you are responsible for:

  • Providing correct Onboarded™ API field names as keys
  • Providing values in the correct data type expected by the API
  • Including all required fields for the target Onboarded™ object

When to Use: Ideal for scenarios where you need to aggregate data from multiple Salesforce objects or sources before creating an Onboarded™ record. Unlike Onboarded Data Sync (which operates on a single Salesforce record), this invocable lets you construct a custom payload from any data combination.

Synchronous vs Asynchronous Execution

This action intelligently determines the best execution path based on your Flow context:

ContextExecutionResponse
Screen Flow / Quick Action (single record)SynchronousActual API response (JSON with Onboarded ID) or error message
Screen Flow / Quick Action (multiple records)Error"Synchronous sync supports single record only"
Record-Triggered FlowAsynchronous"Queueable enqueued for API call..."
Inbound sync in progressDeferred"Queued for deferred processing..."

Synchronous Execution Benefits: When using Screen Flows or Quick Actions with a single record, you receive the actual API response immediately. This allows you to:

  • Capture the new Onboarded ID from Create operations
  • Display success/error messages to users immediately
  • Use Decision elements to handle API errors within your Flow
  • Provide real-time feedback in user-facing interactions

Common Scenarios:

  • Multi-Object Data Assembly: Create an Employee in Onboarded™ using data from Contact, Account, and custom objects combined
  • Custom Data Transformations: Apply business logic or calculations before sending to Onboarded™
  • Non-Standard Mappings: Send data that doesn't follow your configured field mappings (one-off scenarios)
  • Screen Flow User Input: Create Onboarded™ records directly from user-entered data in Screen Flows

Critical Requirement for Create Operations: When using this action with API Action = "Create", you MUST configure the "id" field mapping with Sync Operation = "Bidirectional" for the target Onboarded object type.

Why this matters: After Onboarded creates the new record and generates its unique ID (e.g., ee_abc123), the queueable job needs to write this ID back to your Salesforce record. Without Bidirectional sync for the "id" field, the Salesforce record won't receive the Onboarded ID, causing future sync operations to fail.

Configuration: Navigate to Onboarded Setup → Field Mappings → locate the object section → set the "id" field's Sync Operation to "Bidirectional".

ApiKeyValuePair Class

The application provides the ApiKeyValuePair Apex class to facilitate building key-value pair collections in Flow. This class has two properties that are exposed to Flow:

  • key — The Onboarded™ API field name (must match exactly)
  • value — The value to send for that field

Multi-Source Employee Creation Example

This example demonstrates how to create an Employee in Onboarded™ by combining data from a Contact record, related Account, and a custom object using Loop and Assignment elements.

  1. Create Your Flow. Create a Record-Triggered Flow, Screen Flow, or Autolaunched Flow based on your use case.

    • Example: Record-Triggered Flow when Contact is created
    • Or: Screen Flow where user selects multiple data sources
  2. Create Flow Variables. Create the following variables in your Flow:

    Variable NameData TypePurpose
    varKeyValuePairApiKeyValuePair (Apex-Defined)Temporary holder for individual key-value pairs
    colKeyValuePairsApiKeyValuePair (Collection)Collection of all key-value pairs to send to API
    colFieldsToMapText (Collection)List of Onboarded™ field names to populate (optional, for loop-based approach)
  3. Query Related Records (if needed). If your data comes from multiple objects, use Get Records elements to retrieve related data:

    • Get Account record related to Contact
    • Get custom object records via lookup relationships
    • Store results in record variables for later use
  4. Build Key/Value Pairs Using Loop and Assignment. Use a Loop element to iterate through field mappings, with an Assignment element inside the loop to build each key-value pair. This approach is cleaner and more maintainable than creating multiple Assignment elements.

    1. Create Assignment Element: Populate colFieldsToMap with field names you need to send:
      • Add: first_name
      • Add: last_name
      • Add: email
      • Add: phone
      • Add: employer_id
    2. Add Loop Element: Loop through colFieldsToMap, storing current item in varCurrentField
    3. Inside Loop — Add Assignment Element: For each field:
      • Set varKeyValuePair.key = {!varCurrentField}
      • Set varKeyValuePair.value = [Use Decision element or formula to map field name to actual value]
      • Add varKeyValuePair to colKeyValuePairs collection
      • IMPORTANT: Clear the temporary variable by setting varKeyValuePair.key = null and varKeyValuePair.value = null

    Critical Step: After adding varKeyValuePair to the collection, you MUST clear the key and value properties by setting them to null. This prevents the previous iteration's values from carrying over to the next iteration.

    Individual Assignment Elements (Simple, for Few Fields)

    For flows with only a few fields (5 or less), you can create separate Assignment elements:

    1. Assignment 1 — First Name:
      • Set varKeyValuePair.key = first_name
      • Set varKeyValuePair.value = {!$Record.FirstName}
      • Add varKeyValuePair to colKeyValuePairs
      • Set varKeyValuePair.key = null
      • Set varKeyValuePair.value = null
    2. Assignment 2 — Last Name:
      • Set varKeyValuePair.key = last_name
      • Set varKeyValuePair.value = {!$Record.LastName}
      • Add varKeyValuePair to colKeyValuePairs
      • Set varKeyValuePair.key = null
      • Set varKeyValuePair.value = null
    3. Repeat for remaining fields...
  5. Add the Invoke Onboarded™ API Action. Add an Action element and search for "Invoke Onboarded™ API".

  6. Configure the Action Parameters.

    • Onboarded™ Object: Employee
    • API Action: Create
    • Key/Value Pairs Collection: {!colKeyValuePairs}

Employee Field Reference

When creating an Employee in Onboarded™, you would build key-value pairs like these:

Key (API Field Name)Value Source (Example)Notes
first_name{!$Record.FirstName}From Contact record
last_name{!$Record.LastName}From Contact record
email{!$Record.Email}From Contact record
phone{!$Record.Phone}From Contact record
employer_id{!varAccountOnboardedId}From related Account.Onboarded_Id__c (queried via Get Records)
start_date{!varCustomObject.Start_Date__c}From custom object (queried via Get Records)

API Reference: Consult the Onboarded™ API documentation at https://app.onboarded.com/api/v1/openapi.json for the complete list of available fields and required fields for each object type.

Why Use This Approach: Unlike Onboarded Data Sync (which pulls data from a single Salesforce record), this invocable allows you to combine data from Contact, Account, custom objects, and even user-entered Screen Flow data into a single Onboarded™ API call. This is ideal when no single Salesforce record contains all the data needed.

Agentforce Usage

Use this action only when the data to send does not correspond to a single, existing, mapped Salesforce record — for example, data assembled from multiple sources in the conversation, or fields that Onboarded™ Mappings doesn't cover. For a mapped Salesforce record, prefer Onboarded™ Data Sync instead; this action bypasses field mappings entirely and requires exact knowledge of Onboarded™'s own API field names, which an agent has no way to discover on its own (consult https://app.onboarded.com/api/v1/openapi.json or the Employee Field Reference table above).

Two formatting rules apply to every key-value pair the agent constructs, and are easy to get wrong since nothing else in this guide states them explicitly:

  • Nested fields use dot notation in the key. To set a nested field, use a key like custom_attributes.employee_type rather than attempting to nest a structured value.
  • Every value is sent as a string, including numbers, booleans, and dates — e.g. '42', 'true', '2026-01-15' (ISO 8601) — never as a native JSON number, boolean, or date type.

Same asynchronous caveat as Onboarded™ Data Sync above: a success result means the request was accepted (synchronously answered with the real API response, or queued), not necessarily already applied.

Get Onboarded™ Object Mappings Invocable

Action Label: Get Onboarded™ Object Mappings

Read-only. Returns the high-level map of which Salesforce object (if any) is configured for each of the 7 syncable Onboarded™ object types in this org — Employee, Employer, Client, Job, Placement, Task, and Form. ("Placement Form" is intentionally excluded; it is a sub-object strategy never involved in a direct API sync call.)

This action takes no meaningful input (Salesforce requires at least one input field on every invocable action's request type, so an unused placeholder field is present but ignored).

Output FieldDescription
Is AuthorizedTrue if the running user holds an Onboarded™ permission set. If false, Object Mappings is empty — that means access was denied, not that nothing is mapped.
Object MappingsOne entry for every syncable Onboarded™ object type, whether or not it is currently mapped. Each entry has: Onboarded Object Type, Is Mapped, Salesforce Object API Name (null if unmapped), Salesforce Object Label (null if unmapped).

When to Use: Call this first, with no other context, whenever you (or an agent) need to discover what's even possible to sync in this org before asking a more specific question.

Flow/Apex Usage

  1. Add Action Element. Add an Action element and search for "Get Onboarded™ Object Mappings". No input configuration is required.
  2. Use the Output. The Object Mappings output is a collection — loop over it (or use a Decision element filtering on Is Mapped) to find the Salesforce object configured for a given Onboarded™ object type, or to build a picklist of what's available.
  3. From Apex:
    List<OnboardedObjectMappingOverviewAction.OverviewRequest> requests =
      new List<OnboardedObjectMappingOverviewAction.OverviewRequest>{
        new OnboardedObjectMappingOverviewAction.OverviewRequest()
      };
    List<OnboardedObjectMappingOverviewAction.OverviewResult> results =
      OnboardedObjectMappingOverviewAction.getObjectMappings(requests);

Agentforce Usage

This is the action an agent should call first when it has no prior context — e.g., answering an open-ended prompt like "what can you sync to Onboarded™?" or before attempting any sync action when the agent doesn't already know a specific object pair. The action's own description (visible to the agent's reasoning engine) explains what each of the 7 Onboarded™ object types means in plain terms (Employee = the person being onboarded, Employer = the client company, etc.), so the agent can map a user's conversational language ("candidate," "new hire," "client company") onto the right type without additional configuration here. Once the agent knows which pair it cares about, it should follow up with Get Onboarded™ Field Mappings for Object for field-level detail.

Get Onboarded™ Field Mappings for Object Invocable

Action Label: Get Onboarded™ Field Mappings for Object

Read-only. Returns the field-level mapping detail for one Salesforce-object/Onboarded™-object relationship, looked up from either direction.

ParameterRequiredDescription
Salesforce Object API NameOptionalThe Salesforce object to look up (e.g., Contact). Provide EITHER this or Onboarded Object Type, not both.
Onboarded™ Object TypeOptionalThe Onboarded™ object type to look up: Employee, Employer, Client, Job, Placement, Task, or Form. Provide EITHER this or Salesforce Object API Name, not both.

Supplying both, or neither, is treated as an error and explained in the Message output rather than throwing.

Output FieldDescription
Is AuthorizedSame meaning as on Get Onboarded™ Object Mappings.
Is MappedTrue only when exactly one valid, configured relationship was resolved and it has at least one field mapping.
Salesforce ObjectThe resolved Salesforce object API name. Null if Is Mapped is false.
Onboarded™ ObjectThe resolved Onboarded™ object type. Null if Is Mapped is false.
Field MappingsOne entry per mapped field: Onboarded API Field Name, Salesforce API Field Name, Field Type, Sync Direction, Required. Empty if Is Mapped is false.
MessageExplains why Is Mapped is false — not authorized, not configured, an invalid/unsupported object, ambiguous input, or both/neither parameter supplied. Null on a successful lookup.

Account ambiguity: If Account is mapped to both Employee (as "Person Account") and Employer (as "Account") in the same org, looking it up by Salesforce Object API Name = Account is genuinely ambiguous — the action returns Is Mapped = false with a Message explaining the ambiguity and recommending you supply Onboarded Object Type instead. This is the same ambiguity documented for the Onboarded™ Object parameter on the Onboarded™ Data Sync invocable above.

When to Use: After Get Onboarded™ Object Mappings (or whenever you already know one side of a relationship), to see exactly which fields will be read or written by a sync before attempting it.

Flow/Apex Usage

  1. Add Action Element. Add an Action element and search for "Get Onboarded™ Field Mappings for Object".
  2. Configure Parameters. Set either Salesforce Object API Name (e.g., Contact) or Onboarded™ Object Type (e.g., Employee) — never both.
  3. Use the Output. Check Is Mapped before proceeding; loop over Field Mappings to inspect individual field rows, or surface Message to an end user/log when Is Mapped is false.
  4. From Apex:
    OnboardedFieldMappingAction.FieldMappingRequest req =
      new OnboardedFieldMappingAction.FieldMappingRequest();
    req.onboardedObjectType = 'Task';
    List<OnboardedFieldMappingAction.FieldMappingResult> results =
      OnboardedFieldMappingAction.getFieldMappings(
        new List<OnboardedFieldMappingAction.FieldMappingRequest>{ req }
      );

Agentforce Usage

Call this once the agent (from conversation context, or from a prior call to Get Onboarded™ Object Mappings) knows which Salesforce object or Onboarded™ object type it cares about. Supplying the side the agent already knows and leaving the other blank is the correct pattern — the action resolves the counterpart itself. If the result comes back with Is Mapped = false, the agent should relay the Message field to the user rather than retrying blindly or guessing at a different object; in the Account-ambiguity case in particular, the message tells the agent exactly which follow-up parameter to supply instead.

Get Onboarded™ Task Unlock Sections Invocable

Action Label: Onboarded: Get Task Unlock Sections

Read-only. Intended for approved Agentforce agents only. Returns the list of form sections that can be unlocked for re-completion on a completed Onboarded™ Task.

ParameterRequiredDescription
Task Record IdRequiredThe Salesforce record Id of the completed Onboarded™ Task to look up unlockable sections for.
Output FieldDescription
Onboarded Form IdThe Onboarded™ form definition Id associated with this task.
Unlockable SectionsOne entry per form section currently eligible to be unlocked. Each entry has Section Id and Section Description. Empty if no sections are eligible, or if the caller is not authorized (see below).

When to Use: After a task is complete, to discover which sections (if any) can be reopened for the employee to redo — for example, when an HR rep needs to correct a mistake on a submitted form. This action only reports what's eligible to be unlocked; it does not perform the unlock itself.

Authorization — different from the mapping lookup actions above. This action requires the running user to hold the Onboarded™ Agentforce Access permission set (see Permission Sets), and it will refuse to execute if the running user is on the Salesforce Integration User license, even if that user holds the permission set. In practice this means a shared/integration identity can never successfully call this action — the identity the Agentforce agent runs as must be a real, individually-licensed user. Denial surfaces as a generic access error, not a stack trace.

Agentforce Usage

Useful for an agent helping an HR rep or employee who needs to redo part of a completed task — the agent calls this first to tell the user exactly which sections are eligible before suggesting next steps. Requires the running Agentforce user to hold Onboarded™ Agentforce Access (see above); if authorization fails, the agent should relay a generic "not authorized" message rather than retrying or guessing at a workaround.

Invocable Best Practices

Re-entrancy Protection

Both sync invocables (Onboarded™ Data Sync and Invoke Onboarded™ API) include built-in protection against infinite loops. If an outbound sync is already in progress, subsequent calls will be skipped to prevent recursive execution. The two mapping lookup actions are read-only and have no re-entrancy concerns.

What This Means: If your Flow triggers on record update and the invocable updates the same record (via sync queue processing), the trigger won't fire again, preventing an infinite loop.

Queueable Limits and Deferred Processing

Both sync invocables use queueable jobs to make API callouts. When Salesforce queueable limits are reached, requests are automatically queued in Onboarded_Sync_Queue__c for later processing. The two mapping lookup actions make no callouts and are unaffected by queueable limits.

What This Means: Your Flow will always complete successfully, even if the API call can't be made immediately. Failed or deferred requests can be monitored via the Sync Queue object.

Invocable Selection Guide

ScenarioUse This InvocableWhy
Single Salesforce record created/updatedOnboarded™ Data SyncAutomatically applies configured field mappings
Data from multiple Salesforce objectsInvoke Onboarded™ APIAllows assembly from multiple sources
User-entered data in Screen FlowInvoke Onboarded™ APICan send any data, not tied to records
Custom calculations/transformations neededInvoke Onboarded™ APIFull control over payload construction
Standard sync with mapped fieldsOnboarded™ Data SyncSimpler configuration, no key-value pairs needed
Agent/Flow needs to discover what's mapped, with no context yetGet Onboarded™ Object MappingsZero-input, read-only overview of all syncable object pairs
Agent/Flow knows one object, needs its field-level mappingGet Onboarded™ Field Mappings for ObjectBidirectional lookup, read-only, resolves ambiguous cases explicitly
Agent/Flow needs to know which sections of a completed task can be reopenedGet Onboarded™ Task Unlock SectionsRead-only enumeration; requires the stricter Onboarded™ Agentforce Access permission set

Pro Tip: When building complex Flows with many fields using Invoke Onboarded™ API, consider creating a reusable subflow that handles the key-value pair construction. Pass the source record into the subflow, and return the constructed collection. This makes your main Flow cleaner and the logic reusable across multiple flows.