This tutorial walks through building one complete, working Flow from scratch: a purchase order process where line items over a cost threshold require manager approval before the order can be finalized. It assumes you've already read Flows Overview and have the prerequisite forms and views described there.
What we're building
- A user creates a new Purchase Order (parent record).
- The user adds a Material line item (child record) to that order.
- A Decision checks the line item's Cost Per Unit:
- Under $100 → the flow ends; no approval needed.
- $100 or more → the flow routes to a Manager Approval step.
- Once approved, the flow ends.
Before you start
Make sure the following already exist:
- A Purchase Order table (parent) with a form for creating new orders.
- A Material table (child, related to Purchase Order) with a form that includes a Cost Per Unit field.
- A Manager Approval form on the Material table (or a status field you can edit) that a manager will use to approve the line item.
- (Optional) A user role for the people who will run this Flow, with access to all of the forms and views above (see Potential Errors when Saving a Flow — missing form/view permissions is one of the most common Flow errors).
Step 1: Create the Flow
- From the Admin navigation menu, open the Flows dropdown and select Add New Flow +.
- On the canvas, name the Flow Purchase Order Approval. Keep it short — this name appears on the button end users click from their dashboard.
Step 2: Add the "Create Purchase Order" task
- Drag a Task element onto the canvas and connect it to the Start element.
- With the task selected, open the Edit panel and set:
- Task type: Add
- Table: Purchase Order
- Form: your Purchase Order form
- Label the task Create Purchase Order so it's easy to identify on the canvas.
Step 3: Add the "Add Material Line Item" task
- Drag a second Task element onto the canvas and connect it to the Create Purchase Order task.
- Set:
- Task type: Add
- Table: Material
- Form: your Material form (the one with Cost Per Unit)
- Label it Add Material Line Item. Note: Because Material is a child of Purchase Order, an Edit task cannot immediately follow an Add task on the parent here — TrackVia has no existing child record to edit yet. Using an Add task, as above, is correct for creating the first line item. If you later want to let users edit an existing line item, insert a View task first to let them find it.
- (Optional, to demonstrate Variables) If you want the new Material record to automatically reference the Purchase Order that was just created, set up a Variable that carries the Purchase Order's ID from Step 2 into the assignment field on this task. See Using Variables for the reference-field/assignment-field configuration.
Step 4: Add the "Approval Needed?" Decision
- Drag a Decision element onto the canvas and connect it to Add Material Line Item.
- Label it Approval Needed?
-
Create two results:
- Result "No": Condition = Cost Per Unit less than $100.
- Result "Yes": Condition = Cost Per Unit greater than or equal to $100.
Watch for gaps in your logic. If "Yes" were instead set to greater than $100, a line item priced at exactly $100 would match neither branch, and the user would hit a "Cannot proceed" error. Using "less than" on one side and "greater than or equal to" on the other, as above, closes that gap. See Using Decisions for more on this failure mode.
- (Optional) Give the Save button a custom label for each branch — for example, "Submit for Approval" on the "Yes" path and "Finish Order" on the "No" path — so end users get a clear signal about what happens next.
Step 5: Add the "Manager Approval" task
- Drag a Task element onto the canvas and connect it to the "Yes" result of the Decision.
- Set:
- Task type: Edit
- Table: Material
- Form: your Manager Approval form
- Label it Manager Approval.
Step 6: Add the End elements
- Drag an End element onto the canvas and connect it to the "No" result of the Decision — this is the path for line items that don't need approval.
- Drag a second End element (or reuse the same one, if your canvas layout allows) and connect it after Manager Approval.
Step 7: Save and test
- Click Save Flow.
- If you see a red-flagged error, check first for a missing form on a Task, or an Edit task placed immediately after an Add task on a parent table — these are the two most common blockers (see Potential Errors when Saving a Flow).
- Run through the Flow yourself as a test: create a Purchase Order, add a Material line item under $100 and confirm it ends immediately, then repeat with a line item at $100 or more and confirm it routes to Manager Approval.
Next steps
Once this Flow works end to end, see Best Practices for Building Flows for guidance on filtered views, variable field placement, and other refinements before rolling it out to end users.
Comments
0 comments
Please sign in to leave a comment.