Sales order Katana Integration with Etsy

Mark the sales order as delivered in Katana when order is shipped in Etsy

8/11/20242 min read

Creating a solution to mark a sales order as delivered in Katana when an order is shipped in Etsy using Zapier involves setting up a Zap that connects Etsy and Katana and potentially adding custom scripts for additional functionality. Here's how you can do it along with four custom scripts to enhance the process:

Solution Overview

Zapier Flow:

  1. Trigger: New Order Shipped in Etsy.

  2. Action: Find Sales Order in Katana.

  3. Action: Mark Sales Order as Delivered in Katana.

  4. Custom Scripts: Additional custom scripts to enhance the workflow.

Step-by-Step Implementation
Step 1: Trigger – New Order Shipped in Etsy

  • App: Etsy

  • Trigger Event: New Order Shipped

  • Details: Set up the trigger to fire whenever an order status is updated to "Shipped" in Etsy.

Step 2: Action – Find Sales Order in Katana
  • App: Katana

  • Action Event: Find Sales Order

  • Details: Use the order information from Etsy to find the corresponding sales order in Katana. You may need to match based on order ID, customer name, or other identifiers.

Step 3: Action – Mark Sales Order as Delivered in Katana
  • App: Katana

  • Action Event: Update Sales Order

  • Details: Once the sales order is found, update its status to "Delivered" in Katana.

Step 4: Custom Scripts

To enhance the functionality of this Zap, here are four custom scripts that can be added:

Custom Script 1: Validate Order Matching

Before updating the status in Katana, ensure the Etsy order matches a valid sales order in Katana.

// Script to validate order matching

const etsyOrderId = inputData.etsyOrderId;

const katanaOrderId = inputData.katanaOrderId;

if (etsyOrderId === katanaOrderId) {

return { match: true };

} else {

throw new Error("Etsy order ID does not match Katana order ID.");

}

Usage: Use this script as a filter step in Zapier to proceed only if the order IDs match.

Custom Script 2: Add Tracking Information

Automatically add the shipping tracking information from Etsy to the Katana sales order.

// Script to add tracking information to Katana order

const trackingNumber = inputData.trackingNumber;

const trackingUrl = inputData.trackingUrl;

return {

fields: {

"trackingNumber": trackingNumber,

"trackingUrl": trackingUrl

}

};

Usage: This script can be used as part of the "Update Sales Order" action to enrich the order with tracking details.

Custom Script 3: Send Confirmation Email to Customer

After marking the order as delivered, automatically send a confirmation email to the customer.

// Script to send a confirmation email to the customer

const customerEmail = inputData.customerEmail;

const orderId = inputData.orderId;

return {

to: customerEmail,

subject: `Your Order #${orderId} Has Been Delivered`,

body: `Hi, your order #${orderId} has been marked as delivered. Thank you for shopping with us!`

};

Usage: Add this script as an additional action in Zapier after the sales order is marked as delivered.

Custom Script 4: Log Shipping Status in a Google Sheet

Keep a log of all shipped orders and their delivery status in a Google Sheet.

// Script to log shipping status to Google Sheets

const orderId = inputData.orderId;

const status = inputData.status;

const timestamp = new Date().toISOString();

return {

spreadsheetId: "your-google-sheet-id",

range: "Sheet1!A1",

values: [

[orderId, status, timestamp]

]

};

Usage: Use this script to append a new row to a Google Sheet every time an order is marked as delivered.

Final Zap Setup
  1. Trigger: New Order Shipped in Etsy.

  2. Action: Find Sales Order in Katana.

  3. Action: Custom Script 1 - Validate Order Matching.

  4. Action: Custom Script 2 - Add Tracking Information.

  5. Action: Update Sales Order in Katana (Status = Delivered).

  6. Action: Custom Script 3 - Send Confirmation Email.

  7. Action: Custom Script 4 - Log Shipping Status in Google Sheets.

Summary

This solution not only updates the sales order status in Katana when an Etsy order is shipped but also enhances the workflow with validation, tracking, customer communication, and logging capabilities using custom scripts.