From 9a1119cae007f8d4c4096a6d037a4634d823e03f Mon Sep 17 00:00:00 2001 From: Anh Pham Date: Wed, 4 Sep 2024 12:09:21 -0700 Subject: [PATCH] Add template titled Update the Shipstation address when a Shopify address is updated --- .../update_address_in_shipstation/mesa.json | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 shopify/order/update_address_in_shipstation/mesa.json diff --git a/shopify/order/update_address_in_shipstation/mesa.json b/shopify/order/update_address_in_shipstation/mesa.json new file mode 100644 index 00000000..a77925d2 --- /dev/null +++ b/shopify/order/update_address_in_shipstation/mesa.json @@ -0,0 +1,100 @@ +{ + "key": "shopify/order/update_address_in_shipstation", + "name": "Update the Shipstation address when a Shopify address is updated", + "version": "1.0.0", + "enabled": false, + "setup": true, + "config": { + "inputs": [ + { + "schema": 3, + "trigger_type": "input", + "type": "shopify", + "entity": "order", + "action": "updated", + "name": "Order Updated", + "key": "shopify", + "operation_id": "orders_updated", + "metadata": { + "frequency": "specific", + "includeFields": [ + "billing_address", + "shipping_address" + ] + }, + "local_fields": [], + "selected_fields": [], + "on_error": "default", + "weight": 0 + } + ], + "outputs": [ + { + "schema": 3.1, + "trigger_type": "output", + "type": "shopify", + "entity": "order", + "action": "retrieve", + "name": "Retrieve Order", + "key": "shopify_1", + "operation_id": "get_orders_order_id", + "metadata": { + "api_endpoint": "get admin/orders/{{order_id}}.json", + "order_id": "{{shopify.id}}" + }, + "local_fields": [], + "selected_fields": [], + "on_error": "default", + "weight": 0 + }, + { + "schema": 5, + "trigger_type": "output", + "type": "shipstation", + "entity": "order_createorder", + "action": "create_order", + "name": "Create or Update Order", + "version": "v2", + "key": "shipstation", + "operation_id": "CreateUpdateOrder", + "metadata": { + "api_endpoint": "post /orders/createorder", + "body": { + "orderNumber": "{{shopify_1.order_number}}", + "orderKey": "{{shopify.id}}", + "orderStatus": "{{ template | label: 'What will the order's status be set to?', description: '', tokens: false }}", + "orderDate": "{{shopify_1.created_at}}", + "billTo": { + "name": "{{shopify_1.billing_address.name}}", + "company": "{{shopify_1.billing_address.company}}", + "street1": "{{shopify_1.billing_address.address1}}", + "street2": "{{shopify_1.billing_address.address2}}", + "city": "{{shopify_1.billing_address.city}}", + "state": "{{shopify_1.billing_address.province_code}}", + "postalCode": "{{shopify_1.billing_address.zip}}", + "country": "{{shopify_1.billing_address.country_code}}", + "phone": "{{shopify_1.billing_address.phone}}" + }, + "shipTo": { + "name": "{{shopify_1.shipping_address.name}}", + "company": "{{shopify_1.shipping_address.company}}", + "street1": "{{shopify_1.shipping_address.address1}}", + "street2": "{{shopify_1.shipping_address.address2}}", + "city": "{{shopify_1.shipping_address.city}}", + "state": "{{shopify_1.shipping_address.province_code}}", + "postalCode": "{{shopify_1.shipping_address.zip}}", + "country": "{{shopify_1.shipping_address.country_code}}", + "phone": "{{shopify_1.shipping_address.phone}}" + } + } + }, + "local_fields": [], + "selected_fields": [ + "body.orderKey" + ], + "on_error": "default", + "weight": 1 + } + ] + } +} \ No newline at end of file