Using Integromat for fulfillment

geraint
Tourist
3 0 1

Hi

 

I'm attempting to use Integromat to mass-fulfill orders.  We fulfill and ship orders ourselves.  Although it is actually working, I'm encountering two issues:

 

1) We use a parcel carrier not listed in Shopify. So, I need to enter "Other" as the carrier, and provide a tracking URL. However, when the scenario is run, this data is not entered into Shopify - the carrier is selected as "None" and hence the tracking URL is ignored.

 

2) The "Cancel Fulfillment" option in the "More" menu against the order is not available when fulfilled using this method.

 

I've raised this with Integromat support, who assure me that it's a Shopify issue.  The JSON sent from Integromat to Shopify is as follows:

 

 
[
    {
        "order_id": 1957930762274,
        "location_id": 3611230242,
        "tracking_url": "https://track.dhlparcel.co.uk/default?con=41546980001472",
        "notify_customer": false,
        "shipment_status": "confirmed",
        "tracking_number": "41546980001472",
        "tracking_company": "other",
        "tracking_company_name": "DHL Parcels UK",
        "variant_inventory_management": "shopify"
    }
]
This will be a major time-saver for us, so any help would be most welcome.
Thanks
 
andrew_veitch
Tourist
3 0 2

I'm having the same problem but with a different app. It is definitely a Shopify problem.

 

The issue is that Shopify pattern matches "DHL Parcel UK" (note it should not have an 's') and then changes the tracking link from:

https://track.dhlparcel.co.uk/default?con=xxxxx

To:

https://webtrack.dhlglobalmail.com/?trackingnumber=xxxxx 

 

JoeMM
New Member
1 0 0

Hi @geraint  - were you ever able to get this working? I'm trying to bring in wholesale orders into Shopify that are created in a separate wholesale system (Brandboom) so that our inventory remains accurate. Similar to you, these orders have already been paid for and fulfilled outside of Shopify. Anything you can point to that helped get this working would be much appreciated!

0 Likes
geraint
Tourist
3 0 1

Hi @JoeMM

 

Yes, it does work now.  I did have some dialogue with Shopify and Integromat at the time, it looks like Shopify made a change to allow it to work. 

 

My process is now as follows:

1) Manually copy the parcel carrier shipping manifest into a Google sheet

2) Integromat checks unfulfilled orders in the afternoon.

3) For each unfulfilled order, Integromat searches Google sheet for a corresponding order reference number.

4) If found, Integromat fulfills the order in Shopify, entering the parcel tracking number from the corresponding row in Google sheet

5) Integromat deletes the row, moves on to the next one until there are no further unfullfiled orders 

 

It doesn't handle partially fulfilled orders, but we don't really do that so not an issue for us.  Also, it only works where there is a one-to-one relationship between order number and tracking number, e.g. two orders consolidated into one tracking number needs a slight manual adjustment, but again, we don't really do that.

Hopefully this will be of some use to you.

Cheers

Geraint

0 Likes
mmar
New Member
1 0 0

Hi Geraint, 

 

I am looking for the exact same hack as you described, but cannot quite figure out a way. I have been spending some time now on Integromat and trying to follow your guidelines and I must admit I'm feeling a bit lost in this tool. I desperately need something that could update tracking numbers for my business, would you mind sharing the steps you followed? I.e. triggers/actions and values. 

That would be awesome and would help a man out! 

 

Thanks a lot

0 Likes
geraint
Tourist
3 0 1

Hi @mmar 

Sure, it's a huge time-saver to fulfill this way for us.

I'll share a blueprint of the Integromat scenario with you, below.  To use it, you will need to create a new empty scenario, select "import blueprint".

geraint_0-1614118004151.png

You will need to create and define a Google sheet that agrees to the format of your parcel carrier's manifest/orders overview.  In our case, we copy and paste today's "orders overview" page from their order search page - whatever works for you.  It just needs to have the relevant data to match a shipped order to the open orders on Shopify.

You'll then need to amend the scenario to reflect the format of the data in the sheet - the columns will likely be in a different order, and the references might need trimmed/cleaned. 

Likewise, you'll need to amend specifics such as the tracking URL to suit your carrier.

Once your scenario has run for the day (we set ours to run just after the van has left for the day), you should have:

- nothing left in your Google sheet, i.e. all carrier consignments should have been matched to an open order on Shopify

- no open orders in Shopify, as they will have been matched to a carrier consignment (assuming you've got them all packed and shipped)

Anything outstanding indicates a potential error (eg. you didn't ship an order, or you shipped one twice).

I can't attach a file here, so here's the code, just copy into a notepad file to import into Integromat:

I hope this helps

Geraint

P.S. I'm not an IT professional, I'm at the limit of my knowledge here!

 

Click to expand...
{
    "name": "Fulfill Shopify orders from Google Sheets",
    "flow": [
        {
            "id": 28,
            "module": "shopify:SearchForOrders",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 600298
            },
            "mapper": {
                "limit": "100",
                "status": "open",
                "financial_status": "any",
                "fulfillment_status": "unshipped"
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "fields": {
                        "mode": "chose"
                    },
                    "status": {
                        "mode": "chose",
                        "label": "open"
                    },
                    "__IMTCONN__": {
                        "label": "My Shopify connection"
                    },
                    "financial_status": {
                        "mode": "chose",
                        "label": "any"
                    },
                    "fulfillment_status": {
                        "mode": "chose",
                        "label": "unshipped"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "status",
                        "type": "select",
                        "label": "Status",
                        "validate": {
                            "enum": [
                                "open",
                                "closed",
                                "cancelled",
                                "any"
                            ]
                        }
                    },
                    {
                        "name": "financial_status",
                        "type": "select",
                        "label": "Financial status",
                        "validate": {
                            "enum": [
                                "authorized",
                                "pending",
                                "paid",
                                "partially_paid",
                                "refunded",
                                "partially_refunded",
                                "voided",
                                "unpaid",
                                "any"
                            ]
                        }
                    },
                    {
                        "name": "fulfillment_status",
                        "type": "select",
                        "label": "Fulfillment status",
                        "validate": {
                            "enum": [
                                "shipped",
                                "partial",
                                "unshipped",
                                "any"
                            ]
                        }
                    },
                    {
                        "name": "name",
                        "type": "text",
                        "label": "Name"
                    },
                    {
                        "name": "customer_id",
                        "type": "text",
                        "label": "Customer ID"
                    },
                    {
                        "name": "created_at_min",
                        "type": "date",
                        "label": "Created after"
                    },
                    {
                        "name": "created_at_max",
                        "type": "date",
                        "label": "Created before"
                    },
                    {
                        "name": "limit",
                        "type": "number",
                        "label": "Limit",
                        "required": true
                    },
                    {
                        "name": "fields",
                        "type": "select",
                        "label": "Fields",
                        "multiple": true,
                        "validate": {
                            "enum": [
                                "app_id",
                                "billing_address",
                                "browser_ip",
                                "buyer_accepts_marketing",
                                "cancel_reason",
                                "cancelled_at",
                                "cart_token",
                                "checkout_id",
                                "checkout_token",
                                "closed_at",
                                "confirmed",
                                "contact_email",
                                "created_at",
                                "currency",
                                "current_total_duties_set",
                                "customer",
                                "customer_locale",
                                "device_id",
                                "discount_applications",
                                "discount_codes",
                                "email",
                                "financial_status",
                                "fulfillment_status",
                                "fulfillments",
                                "gateway",
                                "id",
                                "landing_site",
                                "landing_site_ref",
                                "line_items",
                                "location_id",
                                "name",
                                "note",
                                "note_attributes",
                                "number",
                                "order_number",
                                "order_status_url",
                                "original_total_duties_set",
                                "payment_gateway_names",
                                "phone",
                                "presentment_currency",
                                "processed_at",
                                "processing_method",
                                "reference",
                                "referring_site",
                                "refunds",
                                "shipping_address",
                                "shipping_lines",
                                "source_identifier",
                                "source_name",
                                "source_url",
                                "subtotal_price",
                                "subtotal_price_set",
                                "tags",
                                "tax_lines",
                                "taxes_included",
                                "test",
                                "token",
                                "total_discounts",
                                "total_discounts_set",
                                "total_line_items_price",
                                "total_line_items_price_set",
                                "total_price",
                                "total_price_set",
                                "total_price_usd",
                                "total_shipping_price_set",
                                "total_tax",
                                "total_tax_set",
                                "total_tip_received",
                                "total_weight",
                                "updated_at",
                                "user_id"
                            ]
                        }
                    }
                ]
            }
        },
        {
            "id": 24,
            "module": "google-sheets:filterRows",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 601305
            },
            "mapper": {
                "limit": "1",
                "filter": [
                    [
                        {
                            "a": "D",
                            "b": "{{28.name}}",
                            "o": "text:equal"
                        }
                    ]
                ],
                "orderBy": "D",
                "sheetId": "Sheet1",
                "sortOrder": "desc",
                "spreadsheetId": "",
                "tableFirstRow": "A1:Z1",
                "includesHeaders": true,
                "valueRenderOption": "FORMATTED_VALUE",
                "dateTimeRenderOption": "FORMATTED_STRING"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "restore": {
                    "orderBy": {
                        "mode": "chose",
                        "label": "Reference (D)"
                    },
                    "sheetId": {
                        "mode": "chose",
                        "label": "Sheet1"
                    },
                    "sortOrder": {
                        "mode": "chose",
                        "label": "Descending"
                    },
                    "__IMTCONN__": {
                        "label": "My Google connection"
                    },
                    "spreadsheetId": {
                        "mode": "chose",
                        "label": "Tracking for fullfilled Shopify orders"
                    },
                    "tableFirstRow": {
                        "label": "A-Z"
                    },
                    "includesHeaders": {
                        "mode": "chose",
                        "label": "Yes"
                    },
                    "valueRenderOption": {
                        "mode": "chose",
                        "label": "Formatted value"
                    },
                    "dateTimeRenderOption": {
                        "mode": "chose",
                        "label": "Formatted string"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "spreadsheetId",
                        "type": "select",
                        "label": "Spreadsheet",
                        "required": true
                    },
                    {
                        "name": "valueRenderOption",
                        "type": "select",
                        "label": "Value render option",
                        "validate": {
                            "enum": [
                                "FORMATTED_VALUE",
                                "UNFORMATTED_VALUE",
                                "FORMULA"
                            ]
                        }
                    },
                    {
                        "name": "dateTimeRenderOption",
                        "type": "select",
                        "label": "Date and time render option",
                        "validate": {
                            "enum": [
                                "SERIAL_NUMBER",
                                "FORMATTED_STRING"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "type": "number",
                        "label": "Maximum number of returned rows"
                    },
                    {
                        "name": "sheetId",
                        "type": "select",
                        "label": "Sheet",
                        "required": true
                    },
                    {
                        "name": "includesHeaders",
                        "type": "select",
                        "label": "Table contains headers",
                        "required": true,
                        "validate": {
                            "enum": [
                                true,
                                false
                            ]
                        }
                    },
                    {
                        "name": "tableFirstRow",
                        "type": "select",
                        "label": "Column range",
                        "required": true,
                        "validate": {
                            "enum": [
                                "A1:Z1",
                                "A1:BZ1",
                                "A1:CZ1",
                                "A1:DZ1",
                                "A1:MZ1",
                                "A1:ZZ1"
                            ]
                        }
                    },
                    {
                        "name": "filter",
                        "type": "filter",
                        "label": "Filter",
                        "options": {
                            "store": "rpc://google-sheets@2/rpcGetFilterKeys?includesHeaders=true"
                        }
                    },
                    {
                        "name": "sortOrder",
                        "type": "select",
                        "label": "Sort order",
                        "validate": {
                            "enum": [
                                "asc",
                                "desc"
                            ]
                        }
                    },
                    {
                        "name": "orderBy",
                        "type": "select",
                        "label": "Order by"
                    }
                ],
                "interface": [
                    {
                        "name": "__IMTLENGTH__",
                        "type": "uinteger",
                        "label": "Total number of bundles"
                    },
                    {
                        "name": "__IMTINDEX__",
                        "type": "uinteger",
                        "label": "Bundle order position"
                    },
                    {
                        "name": "__ROW_NUMBER__",
                        "type": "number",
                        "label": "Row number"
                    },
                    {
                        "name": "__SPREADSHEET_ID__",
                        "type": "text",
                        "label": "Spreadsheet ID"
                    },
                    {
                        "name": "__SHEET__",
                        "type": "text",
                        "label": "Sheet"
                    },
                    {
                        "name": "0",
                        "type": "text",
                        "label": "Account (A)"
                    },
                    {
                        "name": "1",
                        "type": "text",
                        "label": "Con Number (B)"
                    },
                    {
                        "name": "2",
                        "type": "text",
                        "label": "Carrier (C)"
                    },
                    {
                        "name": "3",
                        "type": "text",
                        "label": "Reference (D)"
                    },
                    {
                        "name": "4",
                        "type": "text",
                        "label": "City (E)"
                    },
                    {
                        "name": "5",
                        "type": "text",
                        "label": "Postcode (F)"
                    },
                    {
                        "name": "6",
                        "type": "text",
                        "label": "Status (G)"
                    },
                    {
                        "name": "7",
                        "type": "text",
                        "label": "Date (H)"
                    },
                    {
                        "name": "8",
                        "type": "text",
                        "label": "(I)"
                    },
                    {
                        "name": "9",
                        "type": "text",
                        "label": "(J)"
                    },
                    {
                        "name": "10",
                        "type": "text",
                        "label": "(K)"
                    },
                    {
                        "name": "11",
                        "type": "text",
                        "label": "(L)"
                    },
                    {
                        "name": "12",
                        "type": "text",
                        "label": "(M)"
                    },
                    {
                        "name": "13",
                        "type": "text",
                        "label": "(N)"
                    },
                    {
                        "name": "14",
                        "type": "text",
                        "label": "(O)"
                    },
                    {
                        "name": "15",
                        "type": "text",
                        "label": "(P)"
                    },
                    {
                        "name": "16",
                        "type": "text",
                        "label": "(Q)"
                    },
                    {
                        "name": "17",
                        "type": "text",
                        "label": "(R)"
                    },
                    {
                        "name": "18",
                        "type": "text",
                        "label": "(S)"
                    },
                    {
                        "name": "19",
                        "type": "text",
                        "label": "(T)"
                    },
                    {
                        "name": "20",
                        "type": "text",
                        "label": "(U)"
                    },
                    {
                        "name": "21",
                        "type": "text",
                        "label": "(V)"
                    },
                    {
                        "name": "22",
                        "type": "text",
                        "label": "(W)"
                    },
                    {
                        "name": "23",
                        "type": "text",
                        "label": "(X)"
                    },
                    {
                        "name": "24",
                        "type": "text",
                        "label": "(Y)"
                    },
                    {
                        "name": "25",
                        "type": "text",
                        "label": "(Z)"
                    }
                ]
            }
        },
        {
            "id": 32,
            "module": "google-sheets:getCell",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 601305
            },
            "filter": {
                "name": "Stop nil returns",
                "conditions": [
                    [
                        {
                            "a": "{{24.`__IMTLENGTH__`}}",
                            "b": "1",
                            "o": "number:greaterorequal"
                        }
                    ]
                ]
            },
            "mapper": {
                "cell": "B{{24.`__ROW_NUMBER__`}}",
                "sheetId": "Sheet1",
                "spreadsheetId": "",
                "valueRenderOption": "FORMATTED_VALUE",
                "dateTimeRenderOption": "FORMATTED_STRING"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "restore": {
                    "sheetId": {
                        "mode": "chose",
                        "label": "Sheet1"
                    },
                    "__IMTCONN__": {
                        "label": "My Google connection"
                    },
                    "spreadsheetId": {
                        "mode": "chose",
                        "label": "Tracking for fullfilled Shopify orders"
                    },
                    "valueRenderOption": {
                        "mode": "chose",
                        "label": "Formatted value"
                    },
                    "dateTimeRenderOption": {
                        "mode": "chose",
                        "label": "Formatted string"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "spreadsheetId",
                        "type": "select",
                        "label": "Spreadsheet",
                        "required": true
                    },
                    {
                        "name": "cell",
                        "type": "text",
                        "label": "Cell",
                        "required": true
                    },
                    {
                        "name": "valueRenderOption",
                        "type": "select",
                        "label": "Value render option",
                        "validate": {
                            "enum": [
                                "FORMATTED_VALUE",
                                "UNFORMATTED_VALUE",
                                "FORMULA"
                            ]
                        }
                    },
                    {
                        "name": "dateTimeRenderOption",
                        "type": "select",
                        "label": "Date and time render option",
                        "validate": {
                            "enum": [
                                "SERIAL_NUMBER",
                                "FORMATTED_STRING"
                            ]
                        }
                    },
                    {
                        "name": "sheetId",
                        "type": "select",
                        "label": "Sheet",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 26,
            "module": "shopify:CreateFulfillment",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 600298
            },
            "mapper": {
                "order_id": "{{28.id}}",
                "location_id": 3611230242,
                "tracking_number": "{{replace(trim(32.value); \"/^\\d+\\s/\"; emptystring)}}",
                "tracking_company": "other",
                "tracking_urls": [
                    "https://apc-overnight.com/receiving-a-parcel/tracking/"
                ],
                "notify_customer": true,
                "variant_inventory_management": "shopify",
                "shipment_status": "confirmed",
                "tracking_company_name": "APC"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "restore": {
                    "__IMTCONN__": {
                        "label": "My Shopify connection"
                    },
                    "location_id": {
                        "mode": "chose",
                        "label": "Acredale Estate"
                    },
                    "tracking_company": {
                        "mode": "chose",
                        "label": "Other"
                    },
                    "line_items": {
                        "mode": "chose",
                        "items": []
                    },
                    "tracking_urls": {
                        "mode": "chose",
                        "items": [
                            "undefined"
                        ]
                    },
                    "notify_customer": {
                        "mode": "chose"
                    },
                    "shipment_status": {
                        "mode": "chose",
                        "label": "confirmed"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "order_id",
                        "type": "number",
                        "label": "Order ID",
                        "required": true
                    },
                    {
                        "name": "location_id",
                        "type": "select",
                        "label": "Location",
                        "required": true
                    },
                    {
                        "name": "tracking_number",
                        "type": "text",
                        "label": "Tracking number"
                    },
                    {
                        "name": "tracking_company",
                        "type": "select",
                        "label": "Tracking company",
                        "validate": {
                            "enum": [
                                "4PX",
                                "APC",
                                "Amazon Logistics UK",
                                "Amazon Logistics US",
                                "Australia Post",
                                "Bluedart",
                                "Canada Post",
                                "China Post",
                                "DHL",
                                "DHL eCommerce",
                                "DHL eCommerce Asia",
                                "Delhivery",
                                "Eagle",
                                "FedEx",
                                "FSC",
                                "FedEx UK",
                                "GLS",
                                "Globegistics",
                                "Japan Post",
                                "New Zealand Post",
                                "PostNord",
                                "Purolator",
                                "Royal Mail",
                                "Sagawa",
                                "TNT",
                                "TNT Post",
                                "UPS",
                                "USPS",
                                "Yamato",
                                "other"
                            ]
                        }
                    },
                    {
                        "name": "line_items",
                        "spec": [
                            {
                                "name": "id",
                                "type": "number",
                                "label": "Order Item ID",
                                "required": true
                            }
                        ],
                        "type": "array",
                        "label": "Line items IDs"
                    },
                    {
                        "name": "tracking_urls",
                        "spec": {
                            "type": "url"
                        },
                        "type": "array",
                        "label": "Tracking URLs"
                    },
                    {
                        "name": "notify_customer",
                        "type": "boolean",
                        "label": "Notify customer"
                    },
                    {
                        "name": "variant_inventory_management",
                        "type": "text",
                        "label": "Variant inventory management"
                    },
                    {
                        "name": "shipment_status",
                        "type": "select",
                        "label": "Shipment status",
                        "validate": {
                            "enum": [
                                "label_printed",
                                "label_purchased",
                                "attempted_delivery",
                                "ready_for_pickup",
                                "confirmed",
                                "in_transit",
                                "out_for_delivery",
                                "delivered",
                                "failure"
                            ]
                        }
                    },
                    {
                        "name": "tracking_company_name",
                        "type": "text",
                        "label": "Tracking company name"
                    }
                ]
            }
        },
        {
            "id": 41,
            "module": "google-sheets:deleteRow",
            "version": 2,
            "parameters": {
                "__IMTCONN__": 601305
            },
            "mapper": {
                "sheetId": 0,
                "rowNumber": "{{24.`__ROW_NUMBER__`}}",
                "spreadsheetId": ""
            },
            "metadata": {
                "designer": {
                    "x": 1200,
                    "y": 0
                },
                "restore": {
                    "sheetId": {
                        "mode": "chose",
                        "label": "Sheet1"
                    },
                    "__IMTCONN__": {
                        "label": "My Google connection"
                    },
                    "spreadsheetId": {
                        "mode": "chose",
                        "label": "Tracking for fullfilled Shopify orders"
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "spreadsheetId",
                        "type": "select",
                        "label": "Spreadsheet",
                        "required": true
                    },
                    {
                        "name": "rowNumber",
                        "type": "uinteger",
                        "label": "Row number",
                        "required": true
                    },
                    {
                        "name": "sheetId",
                        "type": "select",
                        "label": "Sheet",
                        "required": true
                    }
                ]
            }
        }
    ],
    "metadata": {
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "shatter": false,
            "maxErrors": 3,
            "autoCommit": false,
            "sequential": false,
            "confidential": false,
            "dataloss": false,
            "dlq": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "eu1.integromat.com"
    }
}

 

 

0 Likes

Wow, I didn't about the blueprint import/export feature in Integromat. It's great that you can share your automation this way.

One thing I noticed is the hardcoded location_id (3611230242), so @mmar you will also need to adjust it to your location ID. You can find it in your shop Settings > Locations. When you edit a specific location then you can get the ID from the page URL.

LukaszWiktor_0-1614238742470.png

 

I'm a software engineer. I make things happen automatically.
0 Likes