Skip to main content

What you’ll achieve

Import Salesforce opportunities into Sanka orders and automatically create inventory transactions (allocation) when orders are created.

End-to-end flow

  1. Import Salesforce opportunities into orders on a schedule
  2. Create inventory transactions when orders are created
  3. Automate inventory and location updates

Prerequisites

  • Salesforce and Sanka are connected
  • Items, inventory, and locations are prepared in Sanka
  • Order mapping correctly includes item and quantity

Steps

1. Workflow A: Import Salesforce opportunities into orders (time trigger)

  1. In Sanka, open Workflow and select Create workflow.
  2. Choose Time trigger and set the interval.
  3. Add an Import records action and select Order as the object.
  4. Choose Salesforce as the integration service and configure the mapping from opportunities to orders.
  5. Optionally filter by stage, updated date, or other conditions.
  6. Save and enable the workflow.

2. Workflow B: Create inventory transactions from orders (event trigger)

  1. Create a new workflow and choose Order created as the trigger.
  2. Add a Create records action and select Inventory Transaction as the object.
  3. Enable Use data from trigger to carry over items and quantities from the order.
  4. Set the transaction type to Outbound.
  5. Optionally enable auto-create when inventory does not exist and specify allocation locations.
  6. Save and enable the workflow.

3. Validation

  1. Create a test opportunity in Salesforce.
  2. Wait for the import or run it manually.
  3. Confirm an order is created in Sanka and an inventory transaction is created automatically.

Common pitfalls

  • Inventory transactions are not created: confirm item and quantity are present in the order lines.
  • Inventory does not decrease: review inventory settings for the target location.
  • Duplicate allocations: narrow the creation conditions for inventory transactions on the same order.