Recipe — Build an order tracking field set
A complete worked example for e-commerce support. By the end you’ll have four conversation custom fields, one Sidekick detection rule populating the order number automatically, and one automation that routes refund-status conversations to the finance team.
What you’ll end up with
Four conversation fields, one section to group them, one Sidekick rule, one automation:
Conversation custom fields → Section "Order Context"
├── Order Number (Text, auto-populated by Sidekick)
├── Order Status (Select: pending / shipped / delivered / refunded)
├── Fulfillment Center (Select: NA / EU / APAC)
└── Refund Amount (Number, USD)
Before you start
- Admin permissions on Custom Fields, Sidekick, and Automation Rules
- A Finance team configured in Settings → Teams
- An order number format you can describe — for the Sidekick regex (e.g. orders look like
ORD-123456)
Step 1 — Create the section
In Settings → Custom Fields → Conversations:
- Open Sections → New section.
- Name:
Order Context. Display order: 1 (or wherever you want it in the conversation panel). - Save.
Step 2 — Create the four fields
For each, click New field and fill in:
- Order Number — Text — Order Context — No — Key:
order_number - Order Status — Select — Order Context — No — Options:
pending,shipped,delivered,refunded. Key:order_status - Fulfillment Center — Select — Order Context — No — Options:
na,eu,apac. Key:fulfillment_center - Refund Amount — Number — Order Context — No — Key:
refund_amount
Save each. The fields appear immediately on every existing conversation.
Step 3 — Wire Sidekick to extract the order number
Most order numbers are mentioned in plain text by the customer (“about my order ORD-123456”). A regex picks them out reliably.
In Settings → Sidekick → Detection rules → New detection rule:
- Name —
Extract order number from message body - Trigger —
Message received - Target entity — Conversation
- Target field —
order_number - Pattern type — Regex
- Pattern —
\bORD-\d{6,}\b(adjust to your order number format) - Skip if field already set — Yes
Save and enable.
Now any inbound message containing ORD-123456 writes that value to the conversation’s order number field automatically.
Step 4 — Route refund-status conversations to Finance
When a conversation’s order_status is set to refunded (manually by an agent, or by an integration), the conversation should bounce to the finance team for verification.
Build a new Automation:
- 1 — Trigger —
Custom field updated(on conversation) - 2 — Condition —
conversation.custom_fields.order_status equals refunded - 3 — Branch —
Always - 4 — Action 1 —
Assign conversation→ Team: Finance - 5 — Action 2 —
Add tag→ Refund Verification - 6 — Action 3 —
Add note→ “Auto-routed to Finance after order_status set to refunded.” - 7 — Throttle — Per conversation, 1 per 24 hours
Save and enable.
Step 5 — Verify the whole flow
Send a test inbound email to a support inbox:
Hi, I’d like to check on order ORD-987654. The shipment seems delayed.
Open the resulting conversation:
- Within a few seconds, Order Number should populate with
ORD-987654(Sidekick). - The “Order Context” section should be visible in the conversation panel.
Then manually set Order Status to refunded to test the automation:
- Within a few seconds, the conversation should reassign to the Finance team and pick up the
Refund Verificationtag. - Manual Executions for the rule should show the run with all three actions succeeding.
Variants
- Multi-region routing. Use the Fulfillment Center field as a condition for region-specific teams:
If fulfillment_center = eu → assign Finance EU; Else if = apac → assign Finance APAC; Else → assign Finance NA. - Auto-tag by status. A second automation: when
order_statuschanges toshipped, add the tagOrder Shipped; whendelivered, tagOrder Delivered. Useful for filterable views. - Refund-amount thresholds. When
refund_amount > 500, additionally ping a Slack channel for high-value refund visibility.
Troubleshooting
- Symptom: Order number isn’t being extracted. Fix: The regex doesn’t match your actual order format. Open Sidekick activity for a test conversation and check what was attempted. Tighten or loosen the pattern.
- Symptom: Routing automation fires repeatedly. Fix: Throttle scope is wrong (probably global or per-tenant). Switch to per-conversation.
- Symptom: Sidekick overwrites a manually-set order number. Fix: “Skip if field already set” wasn’t enabled on the detection rule. Enable it.
See also
- Auto-populate a custom field with Sidekick
- Use a custom field in an automation
- VIP routing automation recipe — the same routing pattern for built-in customer level