Post tracking number from Shipped order from Shipstation as a note in corresponding Xero invoice

I am trying to pass the tracking number through from Shipstation using the order number/invoice number (Xero) to leave a note on the invoice.

I am getting an error on the last step and have no idea what is going wrong. Any help would be appreciated. Code is below.

Jon

{
“name”: “Shipstation Tracking >> Note in Xero Invoice”,
“flow”: [
{
“id”: 1,
“module”: “shipstation:listenForShipmentEventsDetailed”,
“version”: 1,
“parameters”: {
IMTHOOK”: 1134633
},
“mapper”: {},
“metadata”: {
“designer”: {
“x”: 0,
“y”: 0
},
“restore”: {
“parameters”: {
IMTHOOK”: {
“label”: “My ShipStation Shipment (with Item Info) webhook”,
“data”: {
“editable”: “true”
}
}
}
},
“parameters”: [
{
“name”: “IMTHOOK”,
“type”: “hook:shipstation4”,
“label”: “Webhook”,
“required”: true
}
]
}
},
{
“id”: 2,
“module”: “xero:SearchInvoice”,
“version”: 2,
“parameters”: {
IMTCONN”: 3529629
},
“filter”: {
“name”: “”,
“conditions”: [
[
{
“a”: “{{1.trackingNumber}}”,
“o”: “exist”
},
{
“a”: “{{1.orderNumber}}”,
“o”: “exist”
}
]
]
},
“mapper”: {
“tenantId”: “e1ec6da7-215d-4401-8802-2331f6021fe9”,
“limit”: “250”,
“InvoiceNumbers”: “{{1.orderNumber}}”,
“createdByMyApp”: false,
“summaryOnly”: false
},
“metadata”: {
“designer”: {
“x”: 300,
“y”: 0
},
“restore”: {
“parameters”: {
IMTCONN”: {
“label”: “Xero Dispensary”,
“data”: {
“scoped”: “true”,
“connection”: “xero3”
}
}
},
“expect”: {
“tenantId”: {
“mode”: “chose”,
“label”: “Mamedica Dispensary Limited”
},
“createdByMyApp”: {
“mode”: “chose”
},
“summaryOnly”: {
“mode”: “chose”
},
“type”: {
“mode”: “chose”,
“label”: “Empty”
}
}
},
“parameters”: [
{
“name”: “IMTCONN”,
“type”: “account:xero3”,
“label”: “Connection”,
“required”: true
}
],
“expect”: [
{
“name”: “tenantId”,
“type”: “select”,
“label”: “Organization”
},
{
“name”: “order”,
“type”: “text”,
“label”: “Order By”
},
{
“name”: “limit”,
“type”: “uinteger”,
“label”: “Limit”,
“required”: true
},
{
“name”: “IDs”,
“type”: “text”,
“label”: “Invoices IDs”
},
{
“name”: “InvoiceNumbers”,
“type”: “text”,
“label”: “Invoice Numbers”
},
{
“name”: “ContactIDs”,
“type”: “text”,
“label”: “Contact IDs”
},
{
“name”: “Statuses”,
“type”: “text”
},
{
“name”: “ModifiedAfter”,
“type”: “date”,
“label”: “Modified After”
},
{
“name”: “createdByMyApp”,
“type”: “boolean”,
“label”: “Created By My App”,
“required”: true
},
{
“name”: “summaryOnly”,
“type”: “boolean”,
“label”: “Summary Only”,
“required”: true
},
{
“name”: “type”,
“type”: “select”,
“label”: “Search By”,
“validate”: {
“enum”: [
“field”,
“query”
]
}
}
]
}
},
{
“id”: 5,
“module”: “xero:CreateHistoryNote”,
“version”: 2,
“parameters”: {
IMTCONN”: 3529629
},
“mapper”: {
“tenantId”: “e1ec6da7-215d-4401-8802-2331f6021fe9”,
“Endpoint”: “Invoices”,
“ObjectID”: “{{2.InvoiceNumber}}”,
“Details”: “{{1.trackingNumber}}”
},
“metadata”: {
“designer”: {
“x”: 600,
“y”: 0
},
“restore”: {
“parameters”: {
IMTCONN”: {
“label”: “Xero Dispensary”,
“data”: {
“scoped”: “true”,
“connection”: “xero3”
}
}
},
“expect”: {
“tenantId”: {
“mode”: “chose”,
“label”: “Mamedica Dispensary Limited”
},
“Endpoint”: {
“mode”: “edit”
}
}
},
“parameters”: [
{
“name”: “IMTCONN”,
“type”: “account:xero3”,
“label”: “Connection”,
“required”: true
}
],
“expect”: [
{
“name”: “tenantId”,
“type”: “select”,
“label”: “Organization”,
“required”: true
},
{
“name”: “Endpoint”,
“type”: “select”,
“label”: “Object”,
“required”: true,
“validate”: {
“enum”: [
“BankTransactions”,
“Contacts”,
“Invoices”,
“Items”,
“ManualJournals”,
“Payments”,
“PurchaseOrders”
]
}
},
{
“name”: “ObjectID”,
“type”: “uuid”,
“label”: “Object ID”,
“required”: true
},
{
“name”: “Details”,
“type”: “text”,
“required”: true
}
]
}
}
],
“metadata”: {
“instant”: false,
“version”: 1,
“scenario”: {
“roundtrips”: 1,
“maxErrors”: 3,
“autoCommit”: true,
“autoCommitTriggerLast”: true,
“sequential”: false,
“slots”: null,
“confidential”: false,
“dataloss”: false,
“dlq”: false,
“freshVariables”: false
},
“designer”: {
“orphans”:
},
“zone”: “eu2.make.com
}
}

Welcome to the Make community!

To allow us to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Please share screenshots of your scenario, any error messages, relevant module fields, and filters in question? It would really help other community members to see what you’re looking at.

2. Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

3. Output Bundles of Modules

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

Hi Sam,

Thank you for your message.

Please find the following attached.

  1. Screenshots
  2. Blueprint
  3. Outputs of 3 modules (it won’t let me upload, XXX represents confidential info)
[
    {
        "shipmentId": 137082044,
        "orderId": 222627785,
        "orderKey": "INV-84036",
        "userId": "465f8526-28f9-4615-9acb-b22cccf2d753",
        "customerEmail": "XXparkerd@gmail.com",
        "orderNumber": "INV-84036",
        "createDate": "2024-10-28T16:34:40.000Z",
        "shipDate": "2024-10-28T07:00:00.000Z",
        "shipmentCost": 0,
        "insuranceCost": 0,
        "trackingNumber": "NM035766013GB",
        "isReturnLabel": false,
        "batchNumber": null,
        "carrierCode": "royal_mail",
        "serviceCode": "intersoft_royalmail_sd_guaranteed_1pm_750",
        "packageCode": "royal_mail_small_parcel",
        "confirmation": "signature",
        "warehouseId": 2190355,
        "voided": false,
        "voidDate": null,
        "marketplaceNotified": false,
        "notifyErrorMessage": null,
        "shipTo": {
            "name": "XXXXXX XXXXXX",
            "company": null,
            "street1": "XX XXXXXXX XXXXXX",
            "street2": null,
            "street3": null,
            "city": "XXXXXXX",
            "state": null,
            "postalCode": "XXX XXX",
            "country": "GB",
            "phone": "+44XXX5123872",
            "residential": null,
            "addressVerified": null
        },
        "weight": {
            "value": 1000,
            "units": "grams",
            "WeightUnits": 2
        },
        "dimensions": null,
        "insuranceOptions": {
            "provider": null,
            "insureShipment": false,
            "insuredValue": 0
        },
        "advancedOptions": {
            "billToParty": "4",
            "billToAccount": null,
            "billToPostalCode": null,
            "billToCountryCode": null,
            "storeId": 114550
        },
        "shipmentItems": null,
        "labelData": null,
        "formData": null
    }
]
[
    {
        "Type": "ACCREC",
        "InvoiceID": "4ae97a35-7d79-4784-a415-e22e25ef5793",
        "InvoiceNumber": "INV-84036",
        "Reference": "9d4ca077-36ce-45f0-aeeb-f92d08447e25",
        "Payments": [
            {
                "PaymentID": "1eea116b-15db-4241-81a4-40acfe95806f",
                "Date": "2024-10-25T00:00:00.000Z",
                "Amount": 227,
                "Reference": "INV-84036",
                "CurrencyRate": 1,
                "HasAccount": false
            }
        ],
        "CreditNotes": [],
        "Prepayments": [],
        "Overpayments": [],
        "AmountDue": 0,
        "AmountPaid": 227,
        "AmountCredited": 0,
        "SentToContact": true,
        "CurrencyRate": 1,
        "IsDiscounted": false,
        "HasAttachments": true,
        "InvoiceAddresses": [],
        "InvoicePaymentServices": [],
        "Contact": {
            "ContactID": "96293a12-a825-4c1f-80e3-b05f722259cd",
            "Name": "Daniel Parker 21/04/92",
            "Addresses": [],
            "Phones": [],
            "ContactGroups": [],
            "ContactPersons": []
        },
        "Date": "2024-10-22T00:00:00.000Z",
        "DueDate": "2024-10-22T00:00:00.000Z",
        "BrandingThemeID": "c37c9499-3104-4566-afef-a141a95901b5",
        "Status": "PAID",
        "LineAmountTypes": "Exclusive",
        "LineItems": [
            {
                "ItemCode": "UPMOP10",
                "Description": "Upstate Polaris 20 THC, <1 CBD Flower - MOP (10g)",
                "UnitAmount": 59,
                "TaxType": "ZERORATEDOUTPUT",
                "TaxAmount": 0,
                "LineAmount": 59,
                "AccountCode": "200",
                "Item": {
                    "ItemID": "de323acf-e3b6-4bd2-91eb-2f50b7c5eb04",
                    "Name": "Upstate Polaris 20 THC, <1 CBD Flower - MOP (10g)",
                    "Code": "UPMOP10"
                },
                "Tracking": [],
                "Quantity": 1,
                "LineItemID": "7a52ca3d-1c77-471c-9c99-0dc9fb06c3b3",
                "AccountID": "aa9d1cdb-77f2-4c19-acd5-07ef670ff034"
            },
            {
                "ItemCode": "PED27PD10",
                "Description": "Aurora Pedanios 27 THC, <1 CBD Flower - PD (10g)",
                "UnitAmount": 85,
                "TaxType": "ZERORATEDOUTPUT",
                "TaxAmount": 0,
                "LineAmount": 85,
                "AccountCode": "200",
                "Item": {
                    "ItemID": "ac1300d9-26bc-459e-afd7-3ed070401885",
                    "Name": "Aurora Pedanios 27 THC, <1 CBD Flower - PD (10g)",
                    "Code": "PED27PD10"
                },
                "Tracking": [],
                "Quantity": 1,
                "LineItemID": "a581d734-ca39-4eb5-84b1-7443ada23b64",
                "AccountID": "aa9d1cdb-77f2-4c19-acd5-07ef670ff034"
            },
            {
                "ItemCode": "GLASSTB2010",
                "Description": "Glass Pharms 20% THC <1% CBD Flower - TB (10g)",
                "UnitAmount": 83,
                "TaxType": "ZERORATEDOUTPUT",
                "TaxAmount": 0,
                "LineAmount": 83,
                "AccountCode": "200",
                "Item": {
                    "ItemID": "6d6686ed-b6d6-4ca6-a324-1914357c5056",
                    "Name": "Glass Pharms 20% THC <1% CBD Flower - TB (10g)",
                    "Code": "GLASSTB2010"
                },
                "Tracking": [],
                "Quantity": 1,
                "LineItemID": "e358c009-986a-4e63-a462-34903f03430c",
                "AccountID": "aa9d1cdb-77f2-4c19-acd5-07ef670ff034"
            }
        ],
        "SubTotal": 227,
        "TotalTax": 0,
        "Total": 227,
        "UpdatedDateUTC": "2024-10-25T16:11:14.517Z",
        "CurrencyCode": "GBP",
        "FullyPaidOnDate": "2024-10-25T00:00:00.000Z",
        "__IMTLENGTH__": 1,
        "__IMTINDEX__": 1
    }
]
[
    null
]

blueprint-2.json (9.0 KB)


Thank you in advance for your help.

Regards.

Jon

I am trying various configurations for the last step but is not working.