Tutorial: tag high-value orders and tell Slack

In this tutorial you build a workflow that tags every order of 1,000 or more and posts a line about it to Slack. You start from a template, change one number, add one step, test it without touching a single order, and turn it on. It takes about ten minutes.

You need: a Slack incoming webhook URL, saved as the secret SLACK_WEBHOOK_URL on the Secrets page (see Secrets), and read and write access to orders on the Permissions page (see Permissions and store data access).

1. Create the workflow from the template

  1. Open Workflows and select Browse templates in the top bar.
  2. In the search box type high-value. The card Tag high-value orders appears: trigger Order created, 2 steps, and one setup note.
  3. Select Use template.
The Start from a template window filtered by high-value, showing the card Tag high-value orders with its trigger Order created, 2 steps, the setup note and the Use template button
Search the template gallery for high-value and use the template.

The editor opens with your copy. A blue banner repeats the setup note from the card: set the order total that counts as high value. The canvas already holds the trigger Order created, a Condition and the action Tag the order.

The editor right after Use template, renamed to Tag high-value orders and tell Slack: a blue banner Created from the template Tag high-value orders lists the setup note, the canvas shows Order created, the condition Order total is 500 or more and the action Tag the order on the Then branch
Your copy of the template. The Otherwise branch of the condition is empty, so orders below the amount end the run.
  1. Give it a name: replace the text in Workflow name above the canvas, for example Tag high-value orders and tell Slack.

2. Raise the amount

  1. Select the condition Order total is 500 or more on the canvas. Its settings open in the side panel.
  2. Under Rule 1 the field is event.payload.total_price and the comparison is is at least. Change Value from 500 to 1000.
  3. Change Name to Order total is 1000 or more, so the canvas says what the rule does.
The Condition side panel: Name Order total is 1000 or more, Rule 1 with Field event.payload.total_price, comparison is at least and Value 1000, plus an Add rule button
One rule decides: orders of 1,000 or more go down the Then branch.

3. Add the Slack message

  1. Press the + under Tag the order. The Add a step window opens.
  2. Under Actions, pick Send Slack message.
  3. In the side panel set Name to Tell the team on Slack.
  4. In Webhook URL write {{ secrets.SLACK_WEBHOOK_URL }}. The URL itself stays in the secret, never in the workflow.
  5. Write the Message. Press the variable button on the right of the field to pick values of the order, for example:
High-value order {{ event.payload.name }}: {{ event.payload.total_price }} {{ event.payload.currency }}
The Send Slack message side panel: Name Tell the team on Slack, Webhook URL set to the secret SLACK_WEBHOOK_URL, and a Message with the order name, total and currency as variables
The Slack step. Its message can read anything from the event or from earlier steps.
  1. Select Save in the bar at the top of the admin. The button next to the undo arrow should read No problems.

4. Test it without touching an order

  1. Select Test in the toolbar. The panel Test this workflow opens with the sample event of the trigger under Event (JSON).
  2. The sample order is below 1,000, so it would stop at the condition. Edit the event: change total_price to "1250.00". You can shorten the event to the fields your steps read, like below. Keep admin_graphql_api_id: Tag the order reads it to find the order.
  3. Keep Preview (nothing is changed) and select Run preview.
The Test panel with a short hand-written event: id, admin_graphql_api_id, name #1042, currency USD, total_price 1250.00 and two line items, Preview selected and the Run preview button
A hand-written test event. Only the fields the steps read are needed; Tag the order reads admin_graphql_api_id.

The canvas marks the path in green: trigger, condition, Tag the order, Tell the team on Slack. Select a step to see what it returned. In a preview the two actions do not run; they report what they would have done.

The canvas after Run preview: the trigger, the condition, Tag the order and Tell the team on Slack carry a green check, the Test panel shows the edited event
The whole path ran. Nothing in the store changed.
The side panel of the Slack step after the preview: Test result Previewed, and the JSON wouldRunWith showing the action Send Slack message, the masked webhookUrl and the message High-value order #1042: 1250.00 USD
What the Slack step would have sent. The webhook URL is masked because it comes from a secret.

5. Turn it on

Select Turn on in the top bar. The badge next to the name changes from Off to On. From now on every new order runs the workflow: orders of 1,000 or more get the tag and the Slack message, smaller orders end at the condition. Open Run history to watch the first real runs; see Run history and troubleshooting.

The editor with the On badge next to the workflow name and the Turn off button in the top bar
Turned on. Turn off pauses it at any time; the workflow and its runs stay.

Make it yours