Skip to main content
The examples below show how to sync common product signals from Stigg into Salesforce. Each one assumes you’ve already connected Salesforce to Stigg Workflows. Field names such as Stigg_Customer_ID__c are examples. Replace them with the API names of the fields in your Salesforce org, and replace plan and feature IDs with the IDs from your Stigg product catalog.
Expressions such as {{ $json.customer.id }} reference data from the previous node. The easiest way to get them right is to set mock data on the trigger, then drag fields from each node’s Input panel into its parameters.

Create a Lead when a customer starts a trial on a higher tier

Goal: when a self-serve customer starts a trial of your Pro plan, create a Lead in Salesforce so a sales rep can help them convert. Salesforce setup: on the Lead object, add a Stigg Customer ID text field marked as Unique and External ID, plus optional Stigg Plan (text) and Trial End Date (date) fields.
1

Trigger: Trial started

Add a Stigg Event Trigger and under Events select Subscription Trial Started (subscription.trial_started).
2

Condition: only trials on the Pro plan

Add an If node with the condition:
3

Salesforce: create or update the Lead

On the true branch, add a Salesforce node with Resource set to Lead and Operation set to Create or Update, and configure:
Variation: if the customer already exists in Salesforce as an Account (customer.salesforceId is set), update the Account instead of creating a Lead. Add an If node with {{ $json.customer.salesforceId }} is not empty, and on the true branch use Account > Update with {{ $json.customer.salesforceId }} as the Account ID.

Create a Task when a customer exceeds their usage

Goal: when a customer exceeds the limit of a metered feature, create a follow-up Task for the Account owner so they can offer an upgrade. Salesforce setup: the Account object has a Stigg Customer ID field. If you use the Salesforce → Stigg provisioning integration, this field already exists and is filled in automatically.
1

Trigger: Entitlement usage exceeded

Add a Stigg Event Trigger and under Events select Entitlement Usage Exceeded (entitlement.usage_exceeded).Optionally, under Usage Exceeded Thresholds, click Add Threshold to choose which usage thresholds start the workflow.
2

Condition: only the feature you care about

Add an If node that keeps only events for the relevant feature:
3

Salesforce: find the Account

Add a Salesforce node with Resource set to Search and Operation set to Query, with the query:
4

Salesforce: create the Task

Add another Salesforce node with Resource set to Task and Operation set to Create, and configure:Because this node runs after the Search node, $json holds the Account returned by the query. Use $('If').item.json to reference the original event data. Replace If with the name of your condition node if you renamed it.
entitlement.usage_exceeded fires once each time a customer crosses a usage threshold, so the same customer can generate a new Task in each usage period. To limit noise, set Usage Exceeded Thresholds on the trigger, add a condition on {{ $json.thresholdPercentage }}, or create an Opportunity with Create or Update instead of a Task.

Sync entitlements to the Salesforce Account

Goal: keep a summary of the customer’s current entitlements on their Salesforce Account, so reps can see what the customer has access to without leaving Salesforce. Salesforce setup: on the Account object, add a Stigg Entitlements field of type Long Text Area.
1

Trigger: Entitlements updated

Add a Stigg Event Trigger and under Events select Entitlements Updated (entitlements.updated). This event fires whenever a customer’s entitlements change, for example after a subscription is created, upgraded or canceled, or a promotional entitlement is granted.
2

Format the entitlements

Add a Code node in JavaScript that turns the entitlements array into readable text:
3

Salesforce: find the Account

Add a Salesforce node with Resource set to Search and Operation set to Query:
4

Salesforce: update the Account

Add a Salesforce node with Resource set to Account and Operation set to Update:

Sync usage to Salesforce on a schedule

Goal: once a day, write each customer’s current usage of a key feature to their Salesforce Account, so reps can spot accounts that are close to their limits. Usage changes constantly, so syncing it on every change would quickly use up your Salesforce API limits. A scheduled sync keeps Salesforce up to date with a predictable number of API calls. Salesforce setup: on the Account object, add API Calls Usage (number), API Calls Limit (number) and Usage Synced At (date/time) fields.
1

Trigger: On a schedule

Add an On a schedule trigger that runs once a day, for example at 02:00.
2

Salesforce: get the Accounts to sync

Add a Salesforce node with Resource set to Search and Operation set to Query:
The node outputs one item per Account. The nodes that follow run once for each item.
3

Stigg: get the customer's usage

Add a Stigg node with the Get entitlement to a feature action, and set:
4

Salesforce: update the Account

Add a Salesforce node with Resource set to Account and Operation set to Update:Replace Salesforce in $('Salesforce') with the name of the Search node if you renamed it.
Each Account in the query results makes one Stigg call and one Salesforce update call. If you have many Accounts, narrow the query (for example, to Accounts with an active opportunity), or add a Loop Over Items node to process Accounts in batches.