Skip to main content

What you’ll achieve

You can import Salesforce Opportunities into Sanka Orders and automatically create sales invoices when an order is created.

Overall flow

  1. Periodically import Salesforce Opportunities into Orders
  2. Create sales invoices triggered by order creation
  3. Carry over status or owner fields as needed

Prerequisites

  • Salesforce and Sanka integration is set up
  • Required fields for Orders and Sales Invoices (customer, amount, currency, invoice date, etc.) are configured in Sanka
  • You can store a unique Opportunity identifier (Opportunity ID) on the Order

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 the Import records action and select Order as the object.
  4. Select Salesforce as the connected service and configure the Opportunity → Order field mappings.
  5. Optionally filter by stage, last updated date, and other conditions.
  6. Save and enable the workflow.

2. Workflow B: Create sales invoices from Orders (event trigger)

  1. Create a new workflow and choose Order created as the trigger.
  2. Add the Create record action and select Sales Invoice as the object.
  3. Enable Use data from trigger to carry over Order fields to the invoice.
  4. Optionally set fixed values like invoice date, due date, or status.
  5. Add a filter to prevent duplicate creation for the same Order.
  6. Save and enable the workflow.

3. Verify the flow

  1. Create a test Opportunity in Salesforce.
  2. Wait for the import to run or trigger it manually.
  3. Confirm an Order is created in Sanka and a sales invoice is automatically generated.

Common pitfalls

  • Orders are not imported: check the integration status, import conditions, and mappings.
  • Invoices are not created: confirm required fields and that the workflow is enabled.
  • Duplicate invoices: add a unique key filter (e.g., Opportunity ID).