How it works

Follow these 5 simple steps to start automatically exporting delivered order details

tracktor icon

Fulfillment Status is Delivered

App connector: Tracktor • Time to complete: 0 minutes (Auto-configured)
Why this matters: This trigger captures the exact moment shipments are delivered based on carrier tracking updates monitored by Tracktor, enabling immediate delivery record creation that keeps your fulfillment analytics current and provides timely data for customer service and operations teams.

When Tracktor detects that a shipment's tracking status has changed to "delivered" (based on carrier tracking data updates), this trigger activates the workflow and captures fulfillment data including order ID, tracking number, carrier information, shipment status, delivery timestamp, and shop URL.

Setup requirement: You must have Tracktor installed and configured to monitor your shipments for this trigger to receive delivery webhooks.

Tracktor context: Tracktor is a Shopify app that monitors carrier tracking for your shipments and provides branded tracking pages. When carriers update tracking status to delivered, Tracktor sends webhooks to MESA triggering this workflow.

Retrieve Order

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: Fetches complete Shopify order details including customer information, line items, shipping address, and pricing needed for creating comprehensive delivery records in both fulfillment and order spreadsheets.

This step retrieves the full Shopify order record using the order ID from Tracktor's delivery webhook. It returns complete order data including customer details (name, email, phone), line items with fulfillment status, shipping address, billing information, order total, created date, and fulfillment information. This comprehensive data enables detailed tracking spreadsheets with both fulfillment-level and order-level information.

Add Row - Fulfillments

App connector: Google Sheets • Time to complete: 0 minutes (Auto-configured)
Why this matters: Creates a detailed fulfillment record with tracking and delivery information, providing a fulfillment-centric view that's essential for analyzing carrier performance, delivery times, and shipment-level metrics.

This step adds a row to a Google Sheets spreadsheet with fulfillment-specific data. The spreadsheet includes 12 columns:

  1. Order ID: Shopify internal order ID
  2. Order Name (number): Customer-facing order number (like #1001)
  3. Order Email: Customer email address
  4. Order Phone: Customer phone number
  5. Tracking Number: Carrier tracking number
  6. Tracking Company: Carrier name (USPS, UPS, FedEx, etc.)
  7. Shipping Country: Destination country
  8. Shipment Status: Current tracking status (delivered)
  9. Created At (date and time): Order creation timestamp
  10. Delivery Date (and time): Actual delivery timestamp from carrier
  11. Tracking URL: Branded Tracktor tracking page URL
  12. Days since Ordered: Column for calculating delivery time (formula needed)

The on_error setting is "replay," meaning if the spreadsheet write fails temporarily, the workflow will automatically retry to ensure no deliveries are lost.

Tracking URL format: The URL uses Tracktor's branded tracking page format with order number and email parameters, providing customers with a branded tracking experience rather than direct carrier links.

Verify Order Completion

App connector: Code • Time to complete: 0 minutes (Auto-configured)
Why this matters: Ensures the order is fully fulfilled before logging to the Orders spreadsheet, preventing incomplete order records when multi-item orders have split fulfillments or when some items are still being processed.

This custom JavaScript step validates that all line items in the order are properly fulfilled and require shipping before proceeding.

// Loops through each line item
shopifyOrder.line_items.forEach(item => {
  // Checks if item has no fulfillment status AND requires shipping
  if (item.fulfillment_status == null && item.requires_shipping == true) {
    // Marks order as not ready
    isReadyToSendOrder = false;
  }
});
// Only proceeds to next step if all items are fulfilled
if (isReadyToSendOrder) {
  Mesa.output.next(shopifyOrder);
}

Why this matters for multi-item orders: If an order contains multiple products shipped separately, this code ensures the Orders spreadsheet only gets a row when the LAST package is delivered, preventing duplicate or premature order logging.

Digital products: Items with requires_shipping = false (like digital downloads) don't need fulfillment, so they're excluded from the check.

google sheets logo icon

Add Row - Orders

App connector: Google Sheets • Time to complete: 0 minutes (Auto-configured)
Why this matters: Creates a complete order record with customer and shipping details after confirming all fulfillments are delivered, providing an order-centric view that's essential for customer service lookups, shipping address verification, and revenue tracking.

This step adds a row to a second Google Sheets spreadsheet with complete order information. The spreadsheet includes 16 columns:

  1. Order ID: Shopify internal order ID
  2. Order Name (number): Customer-facing order number
  3. Order Email: Order email (may differ from customer email)
  4. Customer First Name: Customer's first name
  5. Customer Last Name: Customer's last name
  6. Customer Full Name: Complete customer name from default address
  7. Customer Email: Customer account email
  8. Total Price: Order total including tax and shipping
  9. Shipping Address 1: Primary shipping address line
  10. Shipping Address 2: Secondary address line (apt, suite, etc.)
  11. Shipping City: Shipping city
  12. Shipping Zip: Postal code
  13. Shipping Province: State/province
  14. Shipping Country: Destination country
  15. Created At (date and time): Order creation timestamp
  16. Tracking URL: Branded Tracktor tracking page URL

This comprehensive customer and shipping data enables customer service teams to quickly look up delivery details, verify addresses, or reference order information.

Two-spreadsheet approach: Separating Fulfillments and Orders spreadsheets provides different analytical views—fulfillment-level for carrier metrics and order-level for customer service and revenue analysis.

Make it your own

Customize this workflow even further:

Calculate delivery time metrics
Add a formula column to the Fulfillments spreadsheet that subtracts Created At from Delivery Date to calculate actual delivery times, enabling carrier performance analysis and customer expectation management.
Filter by carrier or destination
Add filters before the spreadsheet steps that check carrier name or shipping country and route to different spreadsheets, creating carrier-specific or region-specific delivery logs.
Send delivery notifications
Add email or SMS steps after delivery that send custom "Your order was delivered!" messages to customers, providing a branded touch point beyond standard carrier notifications.
Sync to other systems
Add steps that send delivery data to your CRM, analytics platform, or customer success tools, maintaining synchronized delivery records across your business systems.

Frequently asked questions

Why are there two separate spreadsheets?
The Fulfillments spreadsheet tracks individual shipments (useful for carrier performance, tracking analysis), while the Orders spreadsheet tracks complete orders (useful for customer service, revenue tracking). Orders with multiple shipments get multiple fulfillment rows but only one order row after all deliveries complete.
What happens if a customer has multiple orders delivered?
Each delivered order creates its own row in both spreadsheets. The workflow doesn't consolidate multiple orders—each delivery event is logged separately.
Can I add custom columns to the spreadsheets?
Yes, edit the "Add Row" steps and modify the columns configuration. You can add additional Shopify order fields, Tracktor tracking fields, or create formula columns for calculations like delivery time or shipping cost analysis.
What is a template?
Templates are pre-made workflows by our team of experts. Instead of building a workflow from scratch, these have all the steps needed to complete the task.
Can I personalize a template?
Yes! Every step can be customized to meet your exact requirements. Additionally, you can even add more steps and make it more sophisticated.
Are templates free?
Yes! Our entire library containing hundreds of templates are free to use and customize to your exact needs.

Ready to start automatically exporting delivered order details?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Start with this template — It's free
7-day free trial • 5 min setup • Cancel anytime