> For the complete documentation index, see [llms.txt](https://docs.rishvi.co.uk/linnworks/llms.txt).
> Use it to discover all available pages before exploring further.

# Amazon Customisation 

Automatically extract Amazon order customisation details from order XML, validate the Amazon order reference, and add the customisation values as order notes in Linnworks.

Amazon customised orders can contain important buyer-selected personalisation details that need to be visible during fulfilment, picking, packing, or customer service review. When these details are stored inside Amazon XML data or customisation URLs, teams may need to open and inspect order XML manually.

The *Amazon Customisation Details Note* macro helps make this information easier to access by extracting customisation values from Amazon order XML and adding them directly into Linnworks order notes.

This macro checks each selected order, validates that the Amazon order ID in the XML matches the Linnworks channel reference, retrieves the buyer customisation data, and creates a note containing the SKU, label, and selected input value.

> Keep Amazon customisation details visible by automatically copying buyer-selected values into Linnworks order notes.

## **Configure the Macro**

Once the app is installed, you need to create a macro configuration so the system knows which macro to run, when to run it, and which XML fields should be extracted.

This setup can be adjusted anytime based on your operational requirements.

### **Steps to Configure**

<Tabs>
  <Tab title="Step 1">
    **Go to Apps > Macro Configuration and click + Add new configuration.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779258076563-153tiht2ie7-pasted-image-1779258071970.png?fm=auto&auto=compress%2Cformat" width="1368" height="568" alt="" style="width: 1368px; height: auto; cursor: pointer; margin: 0 auto;" priority={true} fetchPriority="high" />
  </Tab>

  <Tab title="Step 2">
    **Select the Amazon Customization macro and click Create Configuration.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779258925118-k9t2u12kuco-pasted-image-1779258920503.png?fm=auto&auto=compress%2Cformat" width="1202" height="556" alt="" style="width: 1202px; height: auto; cursor: pointer; margin: 0 auto;" priority={true} fetchPriority="high" />

    This creates a new configuration where you can define the required parameter values.
  </Tab>

  <Tab title="Step 3">
    **In the Macro Configuration screen, add the configuration name and parameter values.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779258957904-ycjtov29p8-pasted-image-1779258951573.png?fm=auto&auto=compress%2Cformat" width="710" height="629" alt="" style="width: 710px; height: auto; cursor: pointer; margin: 0 auto;" />

    Configure the required parameters, including:

    - **xmlnodelist**
  </Tab>

  <Tab title="Step 4">
    **Make sure to enable the macro to continue with the Rule Engine configuration.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259017073-jlreulh8y4k-pasted-image-1779259012582.png?fm=auto&auto=compress%2Cformat" width="1484" height="28" alt="" style="width: 1484px; height: auto; cursor: pointer; margin: 0 auto;" />

    <Callout kind="warning" collapsed="false">
      **Note:** If the macro is not enabled, it will not appear in the **Action** value list when setting up the rule.
    </Callout>
  </Tab>

  <Tab title="Step 5">
    **Go to Orders > Rules engine and click + Add new rule.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259053500-lipevhm59z-pasted-image-1779259048340.png?fm=auto&auto=compress%2Cformat" width="1536" height="680" alt="" style="width: 1536px; height: auto; cursor: pointer; margin: 0 auto;" />
  </Tab>

  <Tab title="Step 6">
    **Enter the rule name and click Create.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259109409-t9hxl7hdpgi-pasted-image-1779259104601.png?fm=auto&auto=compress%2Cformat" width="321" height="191" alt="" style="width: 321px; height: auto; cursor: pointer; margin: 0 auto;" />
  </Tab>

  <Tab title="Step 7">
    **Click Add new, select Condition, set the condition as required, and save it.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259152544-c8kmwouew6-pasted-image-1779259146881.png?fm=auto&auto=compress%2Cformat" width="1536" height="358" alt="" style="width: 1536px; height: auto; cursor: pointer; margin: 0 auto;" />

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259179743-rpmr4lbek5h-pasted-image-1779259173950.png?fm=auto&auto=compress%2Cformat" width="641" height="362" alt="" style="width: 641px; height: auto; cursor: pointer; margin: 0 auto;" />

    Use conditions that target Amazon orders where buyer customisation details may be present.
  </Tab>

  <Tab title="Step 8">
  **Add the macro action and click Save.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259210997-840ywrhnzz-pasted-image-1779259206377.png?fm=auto&auto=compress%2Cformat" width="686" height="153" alt="" style="width: 686px; height: auto; cursor: pointer; margin: 0 auto;" />

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259227217-g8in9tdj89j-pasted-image-1779259222529.png?fm=auto&auto=compress%2Cformat" width="657" height="362" alt="" style="width: 657px; height: auto; cursor: pointer; margin: 0 auto;" />

    In the **Add action** window, enter the **Action name**, for example:

    `AmazonCustomisationDetailsNote`

    - Set **Action type** to:

      `Execute a macro`

    - In **Action value**, select:

      `AmazonExtractDetails_new`

    - Click **Save**

    <Callout kind="warning" collapsed="false">
      **Note:** If the macro is not enabled, it will not appear in the **Action** value list when setting up the rule.
    </Callout>
  </Tab>

  <Tab title="Step 9">
    **Review the saved rule setup.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779259259574-652wu2q6os2-pasted-image-1779259254212.png?fm=auto&auto=compress%2Cformat" width="1537" height="706" alt="" />

    - Verify the condition and action are connected correctly

    - Click **Save** in the bottom-right corner to save the rule
  </Tab>
</Tabs>

Amazon customisation details can be important for fulfilment accuracy, especially when products require buyer-selected names, text, colours, options, or other personalisation values. This macro helps reduce manual checks by extracting the required values and adding them to the order notes.

<Columns cols="2">
  <Card title="Reduce Manual XML Checks" icon="alarm-check" horizontal="false" target="_self">
    Eliminates the need to manually inspect Amazon order XML to find customisation details.
  </Card>

  <Card title="Improve Customisation Visibility" icon="boxes" horizontal="false" target="_self">
    Adds buyer customisation details into order notes so they are easier to view during fulfilment.
  </Card>

  <Card title="Validate Amazon Order Match" icon="bell" horizontal="false" target="_self">
    Confirms the Amazon order ID in the XML matches the Linnworks channel reference before creating notes.
  </Card>

  <Card title="Support Accurate Fulfilment" icon="bar-chart-big-icon" horizontal="false" target="_self">
    Helps warehouse and packing teams see SKU-specific personalisation details directly on the order.
  </Card>

  <Card title="Avoid Duplicate Processing" icon="lucide-fast-forward" horizontal="false" target="_self">
    Skips orders that already contain a note created by the same macro.
  </Card>

  <Card title="Store Despatch Date" icon="lucide-message-circle-x" horizontal="false" target="_self">
    Adds the order despatch date as an extended property when the expected despatch-date property is not already available.
  </Card>
</Columns>

### How It Works

The macro checks selected orders, validates the Amazon XML order reference, extracts customisation data, and adds the result as an order note.

<Steps>
  <Step title="Step 1" icon="airplay-icon" title-type="p">
    The macro starts execution and writes **Macro Start - Orders to Process** to the log.
  </Step>

  <Step title="Step 2" icon="airplay-icon" title-type="p">
    It loops through each order ID provided in the **OrderIds** parameter.
  </Step>

  <Step title="Step 3" icon="airplay-icon" title-type="p">
    For each order, the macro retrieves the order details using the Linnworks Orders API.
  </Step>

  <Step title="Step 4" icon="airplay-icon" title-type="p">
    The macro checks whether a despatch-date extended property name exists. If it does not, it adds a **Despatch Date** extended property using the order **DespatchByDate** value.
  </Step>

  <Step title="Step 5" icon="airplay-icon" title-type="p">
    The macro retrieves existing order notes and checks whether the order was already processed by **Add Note From AmazonXMLDataExtract macro**.
  </Step>

  <Step title="Step 6" icon="airplay-icon" title-type="p">
    If the order was already processed, the macro skips that order.
  </Step>

  <Step title="Step 7" icon="airplay-icon" title-type="p">
    The macro retrieves the order XML using the Linnworks Orders API.
  </Step>

  <Step title="Step 8" icon="airplay-icon" title-type="p">
    It reads the Amazon order ID from the XML path **/OrderWithItems/Order/AmazonOrderId** and compares it with the Linnworks channel reference.
  </Step>

  <Step title="Step 9" icon="airplay-icon" title-type="p">
    If the Amazon XML order ID does not match the Linnworks channel reference, the macro skips note creation for that order.
  </Step>

  <Step title="Step 10" icon="airplay-icon" title-type="p">
    If the order reference matches, the macro reads the buyer customisation URL from **BuyerCustomizedInfo/CustomizedURL**.
  </Step>

  <Step title="Step 11" icon="airplay-icon" title-type="p">
    The macro sends the customisation URL to the external XML extraction endpoint and retrieves the customisation XML data.
  </Step>

  <Step title="Step 12" icon="airplay-icon" title-type="p">
    The macro uses the configured **xmlnodelist** parameter to select customisation nodes from the returned XML.
  </Step>

  <Step title="Step 13" icon="airplay-icon" title-type="p">
    For each selected node, the macro extracts the **label** and the input value. The input value can come from **inputValue**, **text**, or **optionValue**.
  </Step>

  <Step title="Step 14" icon="airplay-icon" title-type="p">
    The macro creates note lines in the format **SKU : label - input value**.
  </Step>

  <Step title="Step 15" icon="airplay-icon" title-type="p">
    If note content was created and the same note does not already exist, the macro adds the note to the order.
  </Step>

  <Step title="Step 16" icon="airplay-icon" title-type="p">
    The macro logs any errors and writes **Macro Finished** when execution ends.
  </Step>
</Steps>

### **Usage of App**

This macro is designed to update selected orders automatically through the Rule Engine. It is useful when Amazon personalised or customised order data needs to be visible in Linnworks order notes.

<Card title="OrderIds" horizontal="false" target="_self">
  Defines the Linnworks order IDs that should be processed. Only these selected orders are checked and updated.
</Card>

<Card title="xmlnodelist" horizontal="false" target="_self">
  Defines the comma-separated XML node paths used to select customisation nodes from the returned customisation XML.
</Card>

<Card title="dynamicFields" horizontal="false" target="_self">
  Defines a comma-separated list of field names that the macro reads from each selected XML node.
</Card>

<Card title="AmazonOrderId" horizontal="false" target="_self">
  The macro reads this value from **/OrderWithItems/Order/AmazonOrderId** and compares it with the Linnworks channel reference before processing notes.
</Card>

<Card title="CustomizedURL" horizontal="false" target="_self">
  The macro reads this value from each Amazon order item and sends it to the external XML extraction endpoint.
</Card>

<Card title="Order Note Format" horizontal="false" target="_self">
  Customisation details are added to the order note in the format **SKU : label - input value**.
</Card>

<Card title="Despatch Date Extended Property" horizontal="false" target="_self">
  The macro adds a **Despatch Date** extended property using the order **DespatchByDate** value when the expected property name is not found.
</Card>

<Card title="Execution Logging" horizontal="false" target="_self">
  The macro records processing details, skipped orders, XML parsing issues, API failures, and completion status using the macro logger.
</Card>

### **Key Points to Remember**

- The macro processes only the order IDs provided in **OrderIds**

- The macro is intended to run from the Rule Engine

- The macro retrieves order XML from Linnworks

- The Amazon XML order ID must match the Linnworks channel reference

- Orders with mismatched references are skipped

- Orders already processed by **Add Note From AmazonXMLDataExtract macro** are skipped

- The macro reads customisation URLs from **BuyerCustomizedInfo/CustomizedURL**

- The macro uses an external API endpoint to fetch the customisation XML

- The note format is **SKU : label - input value**

- The input value can come from **inputValue**, **text**, or **optionValue**

- Notes are created with **Internal** set to **false**

- The note creator is set as **Add Note From AmazonXMLDataExtract macro**

- The macro checks whether the same note already exists before adding it

- XML parsing failures are logged and do not stop the full macro run

Once the macro is running, it helps ensure Amazon customisation details are visible directly in Linnworks order notes.

### **What You Can Expect**

- **Amazon customisation details are added to order notes**\
  Matching customisation data is extracted and saved as a non-internal order note.

- **SKU-specific details are included**\
  Each note line includes the SKU followed by the customisation label and selected value.

- **Mismatched XML data is skipped**\
  If the Amazon order ID in the XML does not match the Linnworks channel reference, the macro skips note creation.

- **Previously processed orders are skipped**\
  Orders with an existing note created by this macro are not processed again.

- **Despatch date may be stored as an extended property**\
  The macro can add a **Despatch Date** extended property based on the order despatch date.

- **Execution is logged**\
  The macro records when it starts, processes orders, encounters issues, and finishes.

### **Overall Impact**

This macro improves visibility of Amazon personalisation data, reduces manual XML checks, and helps fulfilment teams process customised orders more accurately.

### What To Do After the Macro Runs

After the macro has completed, review the affected orders to confirm that Amazon customisation details have been added to the order notes.

### **Steps to Follow**

<Steps>
  <Step title="Step 1" title-type="p">
    Open Linnworks and locate the Amazon orders processed by the rule.
  </Step>

  <Step title="Step 2" title-type="p">
    Open an affected order and review the order notes.
  </Step>

  <Step title="Step 3" title-type="p">
    Confirm that the note contains lines in the format **SKU : label - input value**.
  </Step>

  <Step title="Step 4" title-type="p">
    Review the note details against the customised product requirements.
  </Step>

  <Step title="Step 5" title-type="p">
    Continue with normal picking, packing, fulfilment, or customer service processing.
  </Step>
</Steps>

### **Why This Matters**

Keeping Amazon customisation details visible helps:

- Reduce manual order XML checks

- Improve fulfilment accuracy for personalised items

- Make buyer-selected customisation values easier to find

- Prevent missed personalisation details

- Support picking, packing, and customer service workflows

### Best Practices

To get the most value from this macro, configure rule conditions and XML parameters carefully.

### **Recommended Guidelines**

- **Use clear Amazon order conditions**\
  Configure the Rule Engine so the macro runs only for Amazon orders where customisation details may exist.

- **Configure xmlnodelist carefully**\
  Make sure the XML node paths match the structure returned by the customisation XML.

- **Use comma-separated values**\
  Enter multiple XML node paths or dynamic fields as comma-separated values.

- **Review sample orders first**\
  Test the macro on a small number of customised Amazon orders before wider use.

- **Check macro logs**\
  Review logs for skipped orders, XML reference mismatches, parsing failures, or external API errors.

- **Avoid repeated processing**\
  The macro skips orders already processed by the configured creator name, helping prevent duplicate note creation.

### **Troubleshooting**

<Card title="No note was created" horizontal="false" target="_self">
  Confirm that the order contains Amazon order XML and that the XML includes a valid **CustomizedURL** value.
</Card>

<Card title="Order was skipped" horizontal="false" target="_self">
  Check whether the Amazon order ID in the XML matches the Linnworks channel reference.
</Card>

<Card title="Macro is not visible in the Rule Engine" horizontal="false" target="_self">
  Confirm that the macro configuration has been created and enabled in **Apps > Macro Configuration**.
</Card>

<Card title="Customisation values are missing" horizontal="false" target="_self">
  Check the **xmlnodelist** parameter and confirm that the selected nodes contain **label**, **inputValue**, **text**, or **optionValue** values.
</Card>

<Card title="External API returned no data" horizontal="false" target="_self">
  Review the macro logs for the customisation URL and API failure message.
</Card>

<Card title="Duplicate note concern" horizontal="false" target="_self">
  The macro checks whether the same note already exists and also skips orders already processed by the macro creator name.
</Card>

### **Summary**

The *Amazon Customisation Details Note* macro checks selected Linnworks orders, validates the Amazon XML order reference, extracts buyer customisation data from Amazon customisation XML, and adds the details to the order notes.

This helps teams reduce manual checks, improve personalisation accuracy, and keep Amazon customised order details visible throughout the fulfilment process.
