Skip to main content

What you’ll achieve

This page explains how to build a workflow that imports HubSpot deals into Sanka Orders, automatically creates Slips (revenue allocation), and optionally syncs them back to HubSpot.

Overview (this setup)

In a scheduled workflow (time trigger), you will:
  1. Import HubSpot deals into Sanka orders
  2. Delete existing slips (cleanup to avoid duplicates or leftovers)
  3. Create slips from orders (revenue allocation)
  4. Export created slips to a HubSpot custom object (optional)

Prerequisites

  • HubSpot and Sanka are connected
  • A HubSpot custom object to receive slips (e.g., Revenue Allocation) is prepared
  • Required properties exist in Sanka for Orders and Slips (e.g., Deal ID, Amount, Currency, Term/Days)
  • We recommend testing in a new workspace before going live

Steps

1. Create a workflow (time trigger)

Example: employee CSV import
  1. In Sanka, open Workflow and select Create workflow.
  2. Give it a title (e.g., HubSpot Deal -> Order -> Slip (Revenue Allocation)).
  3. Choose Time trigger and set the interval (e.g., every 6 hours).
  4. Add filters if needed (e.g., target period, stage, sync flag).

2. Action 1: Import HubSpot deals into Orders

  1. Choose Import records.
  2. Select Order as the object.
  3. Pick HubSpot as the integration service.
  4. In Property mapping, map HubSpot deal properties to Sanka order properties.
  5. Save the mapping (so you can reuse it later).
Mapping examples
  • HubSpot Deal ID -> Sanka Deal ID (store on the order)
  • Amount (net or gross, based on your operation) -> Order total amount
  • Currency -> Order currency
  • Term or duration fields -> Order period properties (used for allocation later)
Example: employee CSV import

3. Action 2: Delete existing slips (cleanup)

  1. Choose Delete records.
  2. Select Slip as the object.
  3. Set the deletion criteria.
Important
  • Delete all slips in this workspace is risky because it removes every slip in the workspace. Unless this workspace is dedicated to revenue allocation slips, narrow the deletion scope.
  • If possible, filter by Slip type, Created by (integration/import), or Target period to delete only auto-created slips.

4. Action 3: Create slips (revenue allocation) from orders

Example: employee CSV import
  1. Choose Create records.
  2. Select Slip as the object.
  3. Enable Use data from trigger.
  4. Choose a conversion mode.
    • Single slip: create one slip per order
    • Multiple slips: split revenue and create multiple slips (e.g., monthly)
  5. For revenue allocation, specify the period properties (e.g., number of days). Based on the configured values, Sanka will allocate the amount by month and create slips.
  6. Set the slip type (e.g., Sales slip) and any fixed values (source, notes, etc.).
  7. In Property transfer, map fields to carry over from order to slip (Deal ID, owner, etc.).

5. Action 4: Export slips to HubSpot (optional)

Example: employee CSV import
  1. Choose Export records.
  2. Select Export slip records.
  3. Pick HubSpot as the integration service.
  4. Choose the destination HubSpot custom object (e.g., Revenue Allocation).
  5. Map properties so all required HubSpot fields are filled.
Required fields (examples; depends on your setup)
  • Amount (net or gross based on your operation)
  • Currency
  • Deal ID (to link to the right deal)

6. Save and validate

  1. Save the workflow.
  2. Prepare one test deal and wait for the scheduled run (or run manually).
  3. Confirm:
    • Orders are imported
    • Slips (revenue allocation) are created with expected counts and totals
    • The HubSpot custom object is updated (if needed)

Common pitfalls

  • Slips keep duplicating
    • The delete action may not be running or the criteria are too broad.
  • No slips are created
    • Import filters may be too strict or required fields are missing in mapping.
  • Allocated amounts look wrong
    • Period fields (e.g., days) are empty or the units are incorrect.
  • Export to HubSpot fails
    • Required HubSpot fields are not mapped or the integration permissions are missing.