The Order placed trigger starts a workflow every time a customer places an order. Until now it ran for every order, so a workflow meant only for, say, paid orders or orders that used a particular discount code had no way to tell those orders apart.
This enhancement adds trigger conditions to the Order placed trigger, so a workflow runs only when the order matches the criteria you choose — payment status, payment method or gateway, discount, and discount code. It also connects the trigger with WhatsApp: an Order placed workflow can send a WhatsApp form that carries the order’s details, and when the customer replies, the WhatsApp reply trigger keeps the link to that order, so a follow-up workflow can act on it — for example, by adding a tag to that exact order.
This article shows you how to add conditions to the Order placed trigger, how to send an order-related WhatsApp message from the same workflow, and how to build a second workflow that reacts to the customer’s reply by tagging the order.
• New trigger conditions — filter the Order placed trigger by Payment status, Payment method / Gateway, Discount and Discount code.
• Match ALL or ANY — combine up to five conditions and choose whether every condition must match (ALL) or any one of them is enough (ANY).
• WhatsApp integration with order details — the Order placed trigger now passes the order’s information into WhatsApp forms, so the message the customer receives is about their specific order.
• Order linking in WhatsApp replies — when a customer replies to an order-related WhatsApp message, the WhatsApp reply trigger keeps the link to that order.
•
Order-based follow-up actions — use the linked
order in the reply workflow, for example with Update tags (Order) to add
a tag to that order.
• The Workflow automation module must be enabled. If it is not in your left navigation, add it from the Customize modules panel.
• To send WhatsApp messages from a workflow, WhatsApp must be activated on your account. If it is not, opening the Send WhatsApp action shows a Request for WhatsApp business API prompt — click Request now or contact support.
• Sending a WhatsApp flow / form requires the Infobip WhatsApp provider, and the form must be created and approved first. WhatsApp template messages work with any connected provider.
•
A workflow can only have one trigger. The order
workflow and the reply workflow are therefore two separate workflows.
Go to Workflow
automation › Workflows in the left navigation and click Create from
scratch. To change an existing order workflow instead, open it from the
list.
Figure 1: Expand Workflow automation,
open Workflows and click Create from scratch.
The builder
opens with the node list on the left. Under Triggers, drag Order
placed onto the canvas. Until you add conditions, the node reads Any
order.
Figure 2: Drag Order placed from Triggers
onto the canvas. Without conditions it runs for any order.
Click the Order
placed node to open its settings. Under Trigger configuration, the Trigger
conditions section lets you choose which orders start the workflow. Click +
Add condition.
Figure 3: Trigger conditions on the Order
placed node, and + Add condition.
Note: Leave the conditions empty to run the workflow for every order, as before. You can add up to 5 conditions.
Click Select
filter and choose what the condition checks. Four filters are available:
Figure 4: The four filters available on
the Order placed trigger.
• Payment status — the order’s payment status.
• Payment method / Gateway — how the order was paid.
• Discount — whether a discount was applied, or the discount amount.
•
Discount code — the code the customer used.
Payment status
Choose Paid,
Pending, Authorized or Partially paid.
Figure 5: Payment status values.
Payment method / Gateway
Click + Add
condition again, choose Payment method / Gateway, and select Cash
on Delivery (COD), Credit Card, PayPal or Other.
Figure 6: Payment method / Gateway
values.
Discount
Choose Discount
applied or No discount applied, or compare the discount amount with Discount
amount is greater than, is equal to or is less than. The
amount options show an Amount box for the value.
Figure 7: Discount conditions.
Discount code
Choose Contains,
Equals or Does not contain, then type the code in the Discount
code box — VIP20 in this example.
Figure 8: Discount code set to Equals
VIP20.
At the top of Trigger conditions, the Match dropdown decides how the conditions combine:
• ALL — the workflow runs only when the order matches every condition.
•
ANY — the workflow runs when the order matches
at least one condition.
Figure 9: Match ALL or ANY conditions.
Click Done.
The node now summarises its conditions, showing the first one and how many more
apply — for example, Payment status is Paid, +3 more (match all).
Figure 10: The Order placed node with its
conditions summarised.
Note: Every condition must have a value. If one is missing, the builder tells you which condition needs attention when you click Done.
Open Actions
in the node list and drag Send WhatsApp onto the canvas below the
trigger. Then join the two nodes: drag from the dot at the bottom of Order
placed to the dot at the top of Send WhatsApp. A line appears
between them.
Figure 11: Connect Order placed to Send
WhatsApp.
Click the Send WhatsApp node. Under Send type, choose one of the following:
• WhatsApp template — send an approved WhatsApp template.
•
WhatsApp flow / form — send an approved WhatsApp
form that the customer fills in inside WhatsApp. Order placed passes the
order’s details into the form.
Figure 12: Send type — WhatsApp template
or WhatsApp flow / form.
For WhatsApp flow / form, fill in the three fields:
• Form — the approved form to send, such as Order feedback.
• Message text — the message that introduces the form. Merge tags such as {{first_name}} are supported.
•
Button text — the label on the button that opens
the form (up to 20 characters), such as Give feedback.
Figure 13: Form, Message text and Button
text for a WhatsApp form.
Note: If the Form list is empty, there are no approved forms yet. Create and approve a form first.
Click Done,
check that the canvas shows both nodes joined, and click Save. Give the
workflow a name you will recognise, then switch it from Inactive to Active
when you are ready for it to run.
Figure 14: The finished order workflow,
and Save.
When the
customer replies to the order message or submits the form, the reply stays
linked to that order. A second workflow, started by the WhatsApp reply
trigger, can use that link.
Create another workflow with Create from scratch, and drag WhatsApp reply from Triggers onto the canvas. Click it and choose a Trigger source:
• Inbound message — the customer sends a WhatsApp message. Set a Reply condition (contains, starts with, equals (exact match), ends with, or matches regex) and a Match value, such as yes. Matching ignores upper/lower case and surrounding spaces.
•
Form submission — the customer submits a
WhatsApp form.
Figure 15: Trigger source — Inbound
message or Form submission.
For Form
submission, select the same Form you sent from the order workflow — Order
feedback. To react only to certain answers, click + Add field condition,
choose the Field, a Condition and the value — here, How was
your order? contains Excellent.
Figure 16: The Order feedback form, with
a field condition.
Note: Leave the field conditions empty to trigger on any submission of the form. When you add several, all of them must match.
Click Done,
drag Update tags (Order) from Actions onto the canvas, and
connect it to the WhatsApp reply trigger the same way as in Step 8.
Figure 17: Connect WhatsApp reply to
Update tags (Order).
Click the Update
tags (Order) node. Under Action, choose Add tags (or Remove
tags), type the tag in Enter order tag, and click Add. The
tag is applied to the order the customer’s reply is linked to.
Figure 18: Update tags (Order), adding
the tag feedback-received.
Click Done,
then Save, and switch the workflow to Active.
Figure 19: The finished reply workflow —
WhatsApp reply joined to Update tags (Order).
You want to thank customers who paid by credit card with your VIP20 code, and collect their feedback.
• Workflow 1 — Order placed, with Payment status is Paid, Payment method is Credit Card and Discount code equals VIP20, matching ALL. It sends the Order feedback WhatsApp form.
• Workflow 2 — WhatsApp reply, on Form submission of Order feedback. It adds the tag feedback-received to the order the customer replied about.
The tag lands
on the right order automatically, with no manual matching of replies to orders.
Note: Conditions apply only to the Order placed trigger. Existing Order placed workflows without conditions keep running for every order.
Note: A workflow can have only one trigger, so the order message and the reply follow-up are always two workflows.
Note: WhatsApp forms require the Infobip WhatsApp provider. With another provider, choose WhatsApp template instead.
Note: Update tags (Order) acts on the order linked to the reply. Use it in workflows started by a reply to an order-related WhatsApp message.
Note: The forms and form fields shown in Figures 13 and 16–19 are sample forms.
The workflow does not run for an order.
Check the trigger conditions and the Match setting. With ALL, a single condition that does not match stops the workflow.
Clicking Send WhatsApp shows "Request for WhatsApp business API".
WhatsApp is not active on your account yet. Click Request now or contact support.
The Form list says "No approved forms available".
Create a WhatsApp form and wait for it to be approved, then reopen the action.
The action never runs.
Make sure the
nodes are joined by a line on the canvas, the workflow is saved, and it is
switched to Active.
Try the same pattern with other order follow-ups — a delivery-preference form for Cash on Delivery orders, or a thank-you message for orders over a set discount amount — and use order tags to sort and report on the replies.