1. Overview
The Reconcile Contract Data: Oneflow to Salesforce invocable action lets Salesforce administrators pull the latest data from any Oneflow contract back into Salesforce for a specific contract record.
Once configured in a Salesforce Flow (scheduled or event-based), the action will automatically retrieve the most up-to-date contract information from Oneflow and update the corresponding Salesforce contract record.
What does it do?
- Reads the Salesforce contract record you specify.
- Retrieves the latest contract data from Oneflow using the Oneflow contract ID.
- Updates the Salesforce contract record with the latest information from Oneflow.
- Runs asynchronously to avoid blocking your Salesforce processes.
- Returns a structured result so you can check the status of the reconciliation.
2. Input & output reference
2.1 What you pass in (inputs)
| Input Field | Required? | Description |
|---|---|---|
| Salesforce Contract Id | Required | The Salesforce ID of the Oneflow Contract record that should be reconciled with the latest data from Oneflow. |
2.2 What you get back (outputs)
| Output Field | Description |
|---|---|
contractId |
The Salesforce contract ID that was processed. |
status |
The result status: Queued (successfully queued), Failed (an error occurred). |
errorMessage |
If the status is Failed, this contains the error details. Useful for debugging or logging in your Flow. |
3. How to add this action to a Flow
Watch the step-by-step video below to see exactly how to set up the Reconcile Contract Data: Oneflow to Salesforce action in Flow Builder.
The following steps walk you through adding the Reconcile Contract Data: Oneflow to Salesforce action to a Flow.
Step 1: Open Flow Builder
- Log in to Salesforce and navigate to Setup.
- In the Quick Find box, search for Flows and click Flows.
- Click New Flow.
- Select the Flow type that fits your use case (for example, Record-Triggered Flow, Scheduled-Triggered Flow, or Autolaunched Flow).
Step 2: Configure your Flow
- For Record-Triggered Flow: Set up your trigger (for example, when a specific field changes or when a record is created/updated).
- For Scheduled-Triggered Flow: Set the schedule (for example, every night at 2:00 AM) and specify which records to process.
- For Autolaunched Flow: This can be called from other Flows, processes, or Apex.
Step 3: Add a loop (for processing collections)
If your Flow processes a collection of contract records (recommended for bulk processing), you must add a Loop element to iterate over each record individually before calling the action.
- Click the + icon on the canvas to add an element.
- Select Loop.
- Set the Collection Variable to your collection of contract records (for example,
{!Get_Contracts}). - Click Done.
|
TIP If your Flow processes only a single record (e.g., a Record-Triggered Flow), you can skip this step and directly reference |
Step 4: Add the action element
- If you added a loop, place the action inside the loop (drag it onto the loop branch).
- If you are processing a single record, add the action directly on the canvas.
- Click the + icon (inside the loop, or on the canvas) and select Action.
- In the search box, type Reconcile Contract Data: Oneflow to Salesforce.
- Select the action from the list.
Step 5: Configure the input values
- For Salesforce Contract Id, click the field and select the appropriate ID variable:
- If inside a loop, select
{!loopVariable.Id}(whereloopVariableis the name of your loop variable). - If processing a single record (e.g., Record-Triggered Flow), select
{!$Record.Id}. - If you have stored a specific ID in a variable, select that variable.
- If inside a loop, select
- Click Done.
Step 6: (Optional) Use the output
You can store the action output in Flow variables and use them in decision branches, notification emails, or log records.
- In the action element, scroll to Store Output Values.
- Map each output field (for example,
status,errorMessage) to Flow variables. - Add a Decision element after the action (inside the loop or after the loop) to branch on
status = Failedif you want to trigger alerts for failed reconciliations.
Step 7: Activate the Flow
- Click Save and give your Flow a descriptive name (for example, "Reconcile Oneflow Contract Data").
- Click Activate.
4. What data gets synced
When the action runs for an eligible contract, it pulls the following data from Oneflow and updates the corresponding Salesforce contract record:
| Data Type | What is updated |
|---|---|
| Contract status | The current status of the document in Oneflow (for example, Draft, Pending, Signed, etc.). |
| Participant information | Contact and signatory information linked to the document are refreshed to reflect the latest state in Oneflow. |
| Data field values | All mapped data fields are updated with the latest values from the Oneflow document. |
| Products / line items | Opportunity products or line items are updated based on the latest data in the Oneflow document. |
| Document value | The overall document value is recalculated and updated based on the Oneflow document data. |
|
NOTE Not all data is automatically pulled back. The ability to sync products/line items and document values from Oneflow to Salesforce depends on whether two-way sync has been enabled in your Oneflow for Salesforce configuration. Check with your Oneflow administrator to confirm which mappings are bi-directional. |
5. When to use this action vs. the Update Oneflow Documents action
| Action | Direction | Use case |
|---|---|---|
| Update Oneflow Documents | Salesforce → Oneflow | Use this to push the latest Salesforce values (data fields, participants, products, document value) into Oneflow documents |
| Reconcile Contract Data: Oneflow to Salesforce | Oneflow → Salesforce | Use this to pull the current state of the document from Oneflow back into Salesforce (data fields, participants, products, and document value). |
|
NOTE To avoid Salesforce governor limits, we recommend reconciling contracts in smaller batches instead of processing many contracts in a single transaction. |
6. Troubleshooting
| Symptom | Likely cause & resolution |
|---|---|
status = Failed |
Check the errorMessage output for details. Common causes: missing Oneflow Contract ID, or the user does not have permission to read/update the contract record. |
| Contract not updating in Salesforce | Verify that the contract record has a valid OFapp__OF_Contract_Id__c field value. Also check that the Oneflow document actually exists and is accessible. |
| Action not appearing in Flow Builder | Ensure the Oneflow for Salesforce managed package is installed and that your user profile has access to the Apex class ContractListInvocableFromOneflow. |
| Permission error at runtime | The running user must have Read and Edit permissions on the Oneflow Contract object, as well as access to the relevant Oneflow workspace and document. |
| Data not updating in Salesforce | Verify that the field mappings between Oneflow and Salesforce are correctly configured in the Oneflow app settings. The sync can only pull fields that have an active mapping. (Oneflow → Salesforce) |