Skip to content

Form workflows

Steps for

How it works

Every workflow starts with a trigger: the event that starts it. Steps follow: the actions it performs. Connections (paths) link the steps together on the canvas.

The shape of a workflow

Trigger

For example, Form submitted.
(this flows forward)

Step

For example, a Condition that checks an answer.
(this flows forward)

Step

For example, Create customer.
(this flows forward)

End

The workflow run is recorded against the entry.

Steps run one after another, in order (synchronously). While it runs, a workflow can use the entry's answers, the form structure, outputs from earlier steps, and data tables or other stored values. It reads them through data references.

The Workflows tab lists the form's workflows, each with What it does and a Status (such as On). Click View to open one. Forms made from a template already have these:

WorkflowWhat it does
Approve/Reject workflowCreates the customer in Shopify with the group's tag and emails them, or sends a polite no. (Wholesale Registration Form)
Prevent duplicate email registrationsStops a second application from an email that already has an account. (Wholesale Registration Form)
Notification of submissionEmails your team when an entry comes in.

Example workflows

Most forms need one of these patterns. Build them with the steps in Create a workflow.

Approve a trade account application

Add a decision and a button as internal fields. The button is a Workflow trigger button field. Then run a workflow when your team clicks it:

Approve a trade account application

Internal button clicked

Your team approves the entry.
(this flows forward)

Create customer

Creates the customer in your store, with their customer group's tag.
(this flows forward)

Send email

Tells the customer their account is ready.

The Wholesale Registration Form template comes with this set up. Its Approve/Reject workflow creates the customer in Shopify with the chosen customer group's tag, so they see trade prices as soon as they sign in. You approve or reject from the entry: see Approve or reject an application.

For a full walkthrough of an approval process, see the account credit request form.

Notify your team

Email your team about each new entry:

Notify your team

Form submitted

Trigger
(this flows forward)

Send email

An internal email to your team.

Route by answer

Send an entry to a different team depending on an answer:

Route by answer

Form submitted

Trigger
(this flows forward)

Condition

Category equals "Sales"?
(this flows forward)

Send email

True path: the sales team. False path: the support team.

Multi-step approval

Work out a value, record it, then ask for approval only when it's needed:

Multi-step approval

Form submitted

Trigger
(this flows forward)

Calculation

Work out totals.
(this flows forward)

Update entry or row

Write the totals to the entry.
(this flows forward)

Send email

Confirm to the customer.
(this flows forward)

Condition

If the total is over a threshold, request approval.

Reset a dependent field

Use this when one field controls the valid options for another. For example, a customer picks a country, and a second field shows that country's regions. If they change the country, the region they chose may no longer be valid, so the workflow clears it.

Reset a dependent field

Answer updated

Watching Country.
(this flows forward)

Clear answer

Target: Region.
(this flows forward)

Customer chooses again

They pick a valid region for the new country.

Other pairs this suits: country and region, customer group and available products, product category and product, department and approval reason, order type and required supporting details.

Create a workflow

  1. Open your form from Forms (opens in your SparkLayer Dashboard in a new tab) and go to the Workflows tab.
  2. Click Create workflow. The canvas opens.
  3. To rename the workflow, click the pencil icon next to its name at the top left.

Add a trigger

  1. Click + Add Trigger.
  2. Choose the trigger type (see Triggers).
  3. Set its options, for example which answers to watch for Answer updated.

Add steps

  1. Click the + on a trigger or step, or drag its path handle out onto the canvas.
  2. Choose a step type (see Steps).
  3. Set up the step in the panel on the right. Click Expand for more room, or Delete step to remove it.
  4. Connect further steps as needed. Steps with several paths, such as Condition, let you branch the workflow.

Click Arrange steps to tidy the layout. Disable turns the workflow off without deleting it.

Publish the workflow

Workflow changes stay in the draft until you publish the form.

  1. Check your changes are saved.
  2. Click Publish and include Workflows in what you publish.

Entries created before you publish keep using the workflows from their own version. See How versions affect entries.

Check workflow runs

SparkLayer records a run every time a workflow runs. Check it to see what happened.

  1. Open an entry.
  2. Go to Workflow Runs.
  3. Select a run to see its details.
DetailWhat it shows
Start and end timeWhen the run happened.
DurationHow long it took.
StatusCompleted or failed.
Step logsEach step's inputs, outputs and results.

Debug a workflow

  1. Open the workflow run.
  2. Review each step. You can see exactly which path the run took, including conditional branches.
  3. Check error messages and conditions that weren't met.
  4. Fix the workflow or the entry data.

Triggers

TriggerRuns the workflow when
Form submittedA form is completed and submitted.
Entry createdA new entry is created, which is when someone starts filling in the form.
Answer updatedOne or more selected answers change.
Internal field updatedOne or more selected internal fields change.
Page loadedA selected form page loads.
Button clickedA button field on the form is clicked.
Internal button clickedAn admin clicks a button in the internal fields.
API requestIt's called by an API request.

For example: send an internal notification when a form is submitted, recalculate a value when an answer changes, start an approval when an admin clicks an internal button, update internal fields when review data changes, or start a workflow from another system with an API request.

Steps

StepWhat it does
Send emailSends an email to one or more recipients.
ConditionBranches the workflow based on rules.
CalculationCalculates values using numbers, formulas and data references.
For each loopRepeats a set of steps for each item in a list, such as line items, repeatable fields or data table rows.
Update entry or rowUpdates a field on a form entry or a data table row.
Clear answerClears one or more values from a form entry or data table row, for example when related data changes.
Read/Unread entryMarks an entry as read or unread.
Create entry or rowCreates a form entry or data table row.
Delete entry or rowDeletes a form entry or data table row.
API requestSends data to another system, such as your ERP or CRM. Usually set up by a developer.
Get customerFinds an existing SparkLayer customer by ID, platform ID or email.
Create customerCreates a customer in your eCommerce platform and SparkLayer.
Update customerUpdates an existing SparkLayer customer.

Choose the right step

StepUse it when
ConditionThe workflow needs to make a decision.
CalculationYou need totals, scores, discounts or other numbers.
Update entry or rowYou want to write a value to the current entry, an internal field, another form's entry or a data table row.
Clear answerA previous value is no longer valid, such as a selected option after the field that controls its options changes.
For each loopYou need to process every item in a list, such as repeatable fields, line items or filtered data table rows.
API requestAnother system needs the form or workflow data.
Get customer, Create customer, Update customerYou need to find, create or update customer accounts.

Step paths

Some steps have more than one path out. The path decides what happens next.

StepPaths
ConditionTrue, False
For each loopLoop body (for each item), After loop
API requestSuccess, Error
Get customerFound, Not found, Error
Create customerSuccess, Error
Update customerSuccess, Error
Most other stepsNext

For example, an API request continues on the Success path if the request works, or follows the Error path if it fails.

The workflow canvas

You build a workflow by placing and connecting nodes on the canvas.

ActionHow
PanClick and drag the canvas.
ZoomScroll, or use the zoom controls at the bottom left.
Select a nodeClick it.
Select several nodesShift-click, or drag.

Triggers and steps appear as nodes, joined by connections. Click a node to edit its settings, see its input and output data, delete it or reconnect it. To connect steps, drag from one node to another. A step can branch into several paths:

PathMeaning
NextContinue to the next step.
True / FalseConditional branching.
ErrorRuns when a step fails.
LoopUsed in repeated processes.

Tips

  • Keep each workflow to one process, and name it clearly. Don't combine unrelated automations.
  • Before publishing, use the Preview tab, submit test entries and check the workflow runs for errors.
  • Plan for errors: add Error paths where needed, log important outputs, and protect critical workflows.
  • Avoid unnecessary API calls and very long chains of steps.
Was this page helpful?

Last updated