> 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.

# Shopify POS Location Stock Deduction

Automatically adjust stock levels for processed Shopify POS orders by checking today’s processed orders, identifying orders with the SHOPIFY_POS extended property, and reducing stock at the fulfilment location.

## Overview

Shopify POS Location Stock Deduction is an automated inventory-adjustment solution for Linnworks. It searches processed orders from the current UTC day, identifies Shopify POS orders, and reduces stock for eligible items at the fulfilment location recorded against each order.

The macro processes only orders containing the **SHOPIFY\_POS** extended property. It skips service items and items with blank SKUs, while composite products are handled by reducing stock for their individual component items.

Before applying a stock reduction, the macro checks the stock item change history for a matching order-reference note. If the same note already exists, the adjustment is skipped to help prevent duplicate stock deductions.

This is a scheduled macro and does not require `OrderIds` or any custom configuration parameters.

> Keep Shopify POS stock movements aligned with processed Linnworks orders by automatically reducing stock at the correct fulfilment location.

## Who Should Use Shopify POS Location Stock Deduction

<Columns cols="2">
  <Card title="Retail & POS Teams" icon="shopping-bag" horizontal="false" target="_self">
    Teams processing Shopify POS sales can use the macro to keep Linnworks stock aligned with completed in-store orders.
  </Card>

  <Card title="Warehouse & Inventory Teams" icon="package" horizontal="false" target="_self">
    Inventory teams benefit from automatic stock reductions at the fulfilment location recorded against each processed order.
  </Card>

  <Card title="Integration Administrators" icon="settings" horizontal="false" target="_self">
    Administrators configure the macro schedule, enable the configuration, and monitor processing and stock-adjustment logs.
  </Card>

  <Card title="Operations & Reconciliation Teams" icon="bar-chart-2" horizontal="false" target="_self">
    Operations teams can use stock movement notes to connect inventory changes back to the original Shopify POS order.
  </Card>
</Columns>

## Key Features

<Columns cols="2">
  <Card title="Processed Order Search" icon="search" horizontal="false" target="_self">
    Searches Linnworks processed orders from the beginning of the current UTC day up to the current UTC time.
  </Card>

  <Card title="Shopify POS Validation" icon="check-circle" horizontal="false" target="_self">
    Processes only orders containing the SHOPIFY\_POS extended property.
  </Card>

  <Card title="Location-Based Stock Deduction" icon="map-pin" horizontal="false" target="_self">
    Reduces stock at the Linnworks stock location matching the processed order fulfilment location.
  </Card>

  <Card title="Composite Item Support" icon="boxes" horizontal="false" target="_self">
    Reduces stock for composite component items instead of adjusting the parent composite SKU.
  </Card>

  <Card title="Duplicate Adjustment Prevention" icon="shield-check" horizontal="false" target="_self">
    Checks stock item history for an existing order-reference note before applying a new stock reduction.
  </Card>

  <Card title="Stock Movement Traceability" icon="file-text" horizontal="false" target="_self">
    Records the order number and reference number in the stock movement note.
  </Card>
</Columns>

## How Shopify POS Location Stock Deduction Works

Shopify POS Location Stock Deduction follows a defined sequence whenever the scheduled macro runs.

<Steps>
  <Step title="Step 1: Retrieve stock locations" title-type="p">
    The macro retrieves all Linnworks stock locations so processed order fulfilment locations can be matched correctly.
  </Step>

  <Step title="Step 2: Build the UTC search window" title-type="p">
    The processed order search starts at `00:00 UTC` on the current day and ends at the current UTC time.
  </Step>

  <Step title="Step 3: Search processed orders" title-type="p">
    The macro searches up to 500 processed orders using the processed date field.
  </Step>

  <Step title="Step 4: Match the fulfilment location" title-type="p">
    Each processed order fulfilment location is matched to the corresponding Linnworks stock location.
  </Step>

  <Step title="Step 5: Retrieve full order information" title-type="p">
    The macro retrieves the complete Linnworks order using the processed order ID.
  </Step>

  <Step title="Step 6: Validate Shopify POS status" title-type="p">
    The order extended properties are checked for an entry named **SHOPIFY\_POS**.
  </Step>

  <Step title="Step 7: Evaluate order items" title-type="p">
    Service items and items with blank SKUs are skipped.
  </Step>

  <Step title="Step 8: Handle composite items" title-type="p">
    When an item contains composite sub-items, each component is processed for stock deduction.
  </Step>

  <Step title="Step 9: Check stock history" title-type="p">
    The macro checks the SKU stock history at the fulfilment location for an existing note containing the order number and reference.
  </Step>

  <Step title="Step 10: Apply stock deduction" title-type="p">
    When no matching stock movement note exists, stock is reduced using a negative quantity adjustment.
  </Step>

  <Step title="Step 11: Record the movement note" title-type="p">
    The stock update is saved with a note in the format `Order {OrderNumber} ref: {ReferenceNumber}`.
  </Step>

  <Step title="Step 12: Complete execution" title-type="p">
    Processed orders, skipped items, duplicate checks, stock updates, errors, and macro completion are written to the execution log.
  </Step>
</Steps>

## **Configure the Macro**

Once the app is installed, you need to create a macro configuration so the system knows which macro to run. This macro does not require order IDs or custom parameters because it searches processed orders directly.

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/1781154375319-jnsxqglvazj-pasted-image-1781154369392.png?fm=auto&auto=compress%2Cformat" width="1368" height="568" alt="" priority={true} fetchPriority="high" />
  </Tab>

  <Tab title="Step 2">
    **Select the Shopify POS Location Stock Deduction macro and click Create Configuration.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779351789991-9rcse2jepv-pasted-image-1779351777748.png?fm=auto&auto=compress%2Cformat" width="1197" height="541" alt="" priority={true} fetchPriority="high" />

    This creates a new configuration where the macro can be enabled and scheduled.
  </Tab>

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

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

    Example configuration name:

    `Shopify POS Location Stock Deduction`

    This macro does not require parameter values because it runs without input parameters.

    <Callout kind="info" collapsed="false">
      **Note:** The macro searches processed orders directly, so there are no **OrderIds** or custom parameter values to enter.
    </Callout>
  </Tab>

  <Tab title="Step 4">
    **Configure the schedule.**

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

    In the **Schedule Config** window:

    - Enter the **Name**
    - Select **Schedule type** from the dropdown:
      - **One time**
      - **Recurring**
    - If **Recurring** is selected:
      - In **Frequency**, choose:
        - **Daily**
        - **Weekly**
    - Set **Recurs every**, for example:

      `1 day`
    - Set the **Starting on** date and time
    - Under **Daily frequency**, choose one option:
      - **Occurs once at**
      - **Occurs every**
    - Review the **Summary** section
    - Click **Save**
  </Tab>

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

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

  <Tab title="Step 6">
    **Make sure to enable the macro.**

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

    <Callout kind="warning" collapsed="false">
      **Note:** If the macro is not enabled, the scheduled execution will not run.
    </Callout>
  </Tab>
</Tabs>

## Key Benefits

Manual Shopify POS stock adjustments require teams to identify the processed order, determine the fulfilment location, inspect the order items, and update each SKU individually. Shopify POS Location Stock Deduction automates this process.

> Reduce manual stock corrections, improve location-level inventory accuracy, and maintain traceable stock movements for processed Shopify POS orders.

<Columns cols="2">
  <Card title="Reduce Manual Stock Updates" icon="trending-down" horizontal="false" target="_self">
    Automatically reduces stock for eligible processed Shopify POS orders.
  </Card>

  <Card title="Improve Inventory Accuracy" icon="check-circle" horizontal="false" target="_self">
    Keeps Linnworks stock aligned with Shopify POS orders processed during the current UTC day.
  </Card>

  <Card title="Use the Correct Location" icon="map-pin" horizontal="false" target="_self">
    Applies stock adjustments to the stock location matching the order fulfilment location.
  </Card>

  <Card title="Support Composite Products" icon="boxes" horizontal="false" target="_self">
    Reduces stock for composite component items when the processed order contains a composite product.
  </Card>

  <Card title="Prevent Duplicate Deductions" icon="shield-check" horizontal="false" target="_self">
    Checks stock history before applying another stock movement for the same order reference.
  </Card>

  <Card title="Improve Stock Traceability" icon="file-text" horizontal="false" target="_self">
    Adds a stock movement note containing the processed order number and reference number.
  </Card>
</Columns>

## Usage of App

Shopify POS Location Stock Deduction is designed to run through the **Linnworks Macro Schedule Engine**.

It does not require selected order IDs. Each execution searches processed orders directly using a current-day UTC date range.

### Execution

<Card title="Trigger via Schedule" icon="play" horizontal="false" target="_self">
  Configure a one-time or recurring schedule in Macro Configuration. When the schedule runs, the macro searches the current UTC day's processed orders and evaluates eligible Shopify POS orders automatically.
</Card>

### Outcome

When the scheduled macro runs, it:

<Steps>
  <Step title="Searches processed orders" title-type="p">
    Retrieves up to 500 orders processed between the start of the current UTC day and the current UTC time.
  </Step>

  <Step title="Identifies Shopify POS orders" title-type="p">
    Continues only when an order contains the SHOPIFY\_POS extended property.
  </Step>

  <Step title="Matches the fulfilment location" title-type="p">
    Finds the Linnworks stock location corresponding to the processed order fulfilment location.
  </Step>

  <Step title="Evaluates eligible stock items" title-type="p">
    Skips service lines and blank SKUs while processing normal and composite component items.
  </Step>

  <Step title="Checks for an existing movement" title-type="p">
    Searches stock item history for a matching order-reference note.
  </Step>

  <Step title="Reduces stock" title-type="p">
    Applies a negative stock quantity adjustment where no duplicate movement exists.
  </Step>

  <Step title="Records the result" title-type="p">
    Saves the stock movement note and logs updates, skips, and errors.
  </Step>
</Steps>

## Input Parameters

Shopify POS Location Stock Deduction does not require any runtime input parameters.

| Parameter             | Required | Description                                                                      |
| --------------------- | -------- | -------------------------------------------------------------------------------- |
| **OrderIds**          | No       | The macro does not use selected order IDs.                                       |
| **Custom parameters** | No       | No custom values are required in Macro Configuration.                            |
| **Schedule**          | Yes      | A one-time or recurring schedule is required to trigger the macro automatically. |

The macro relies on the following Linnworks order and inventory data:

| Data Requirement                   | Description                                                   |
| ---------------------------------- | ------------------------------------------------------------- |
| **Processed order date**           | Used to find orders processed during the current UTC day.     |
| **SHOPIFY\_POS extended property** | Identifies orders eligible for stock deduction.               |
| **Fulfilment location**            | Used to select the stock location where inventory is reduced. |
| **Order item SKU**                 | Used to identify the stock item to update.                    |
| **Order item quantity**            | Used to calculate the negative stock adjustment.              |
| **Composite sub-items**            | Used instead of the parent item when the item is composite.   |
| **Stock item history**             | Checked to help prevent duplicate order-related deductions.   |

## Processed Order Search Rules

The macro uses the following processed order search behaviour:

| Search Setting             | Value                      |
| -------------------------- | -------------------------- |
| **Date field**             | `processed`                |
| **Start time**             | Current UTC day at `00:00` |
| **End time**               | Current UTC time           |
| **Maximum orders per run** | `500`                      |
| **Execution type**         | Scheduled macro            |

<Callout kind="warning" collapsed="false">
  **Important:** The macro searches the current UTC day rather than the local calendar day. Schedule timing should account for this behaviour.
</Callout>

## Order Eligibility Rules

The macro applies the following eligibility checks:

| Order or Item Condition                                | Macro Behaviour                                                |
| ------------------------------------------------------ | -------------------------------------------------------------- |
| Order contains **SHOPIFY\_POS**                        | Continues with stock processing.                               |
| Order does not contain **SHOPIFY\_POS**                | Skips the order.                                               |
| Fulfilment location matches a Linnworks stock location | Uses that location for stock updates.                          |
| Service item                                           | Skips the item.                                                |
| Blank SKU                                              | Skips the item.                                                |
| Normal stock item                                      | Processes the order item SKU directly.                         |
| Composite item                                         | Processes each composite component instead of the parent item. |
| Matching stock history note already exists             | Skips the stock adjustment.                                    |
| Matching stock history note does not exist             | Reduces stock by the required quantity.                        |

## Stock Adjustment Rules

The stock update uses the ordered quantity as a negative adjustment.

| Item Type               | Quantity Used                                                       |
| ----------------------- | ------------------------------------------------------------------- |
| **Normal item**         | Negative order item quantity                                        |
| **Composite component** | Negative component quantity based on the ordered composite quantity |
| **Service item**        | No stock update                                                     |
| **Blank SKU item**      | No stock update                                                     |

The stock movement note follows this format:

`Order {OrderNumber} ref: {ReferenceNumber}`

This note is used both for traceability and for the duplicate-adjustment check.

## Example Scenario

Assume a processed order contains:

| Order Detail        | Example Value    |
| ------------------- | ---------------- |
| Extended property   | `SHOPIFY_POS`    |
| Order number        | `100245`         |
| Reference number    | `SPOS-7890`      |
| Fulfilment location | `Main Warehouse` |
| SKU                 | `CHAIR-BLACK`    |
| Quantity            | `2`              |

The macro checks the stock history for `CHAIR-BLACK` at `Main Warehouse` for the following note:

`Order 100245 ref: SPOS-7890`

<Columns cols="2">
  <Card title="No Matching History Note" icon="trending-down" horizontal="false" target="_self">
    The macro reduces stock for CHAIR-BLACK at Main Warehouse by `-2`.
  </Card>

  <Card title="Matching History Note Exists" icon="shield-check" horizontal="false" target="_self">
    The macro skips the adjustment to help avoid deducting stock again.
  </Card>
</Columns>

## Best Practices

> Schedule the macro frequently enough to keep Shopify POS stock movements current while accounting for the current-day UTC search window.

<Columns cols="2">
  <Card title="Run the macro regularly" icon="calendar" horizontal="false" target="_self">
    Configure a recurring schedule that matches how frequently Shopify POS orders are processed.
  </Card>

  <Card title="Confirm Shopify POS tagging" icon="check-circle" horizontal="false" target="_self">
    Ensure eligible orders contain the SHOPIFY\_POS extended property.
  </Card>

  <Card title="Validate fulfilment locations" icon="map-pin" horizontal="false" target="_self">
    Confirm that processed order fulfilment location names match active Linnworks stock locations.
  </Card>

  <Card title="Review stock history notes" icon="file-text" horizontal="false" target="_self">
    Check sample stock movements after setup to confirm the expected order-reference notes are created.
  </Card>

  <Card title="Monitor the 500-order limit" icon="bar-chart-2" horizontal="false" target="_self">
    Review daily processed order volumes and schedule frequency where more than 500 orders may be processed.
  </Card>

  <Card title="Test composite items" icon="boxes" horizontal="false" target="_self">
    Confirm that component quantities are reduced correctly for composite Shopify POS products.
  </Card>
</Columns>

## FAQ

**How is Shopify POS Location Stock Deduction triggered?**

The macro is triggered through a schedule configured in Linnworks Macro Configuration.

**Does the macro use OrderIds?**

No. It searches processed orders directly and does not require selected order IDs.

**Does the macro require custom configuration parameters?**

No. Only the configuration name, schedule, and enabled status are required.

**Which processed orders are searched?**

The macro searches orders processed from the beginning of the current UTC day up to the current UTC time.

**How many processed orders are checked in one run?**

The documented limit is 500 processed orders per execution.

**How does the macro identify Shopify POS orders?**

It checks whether the order contains an extended property named **SHOPIFY\_POS**.

**Which stock location is updated?**

The stock location matching the processed order fulfilment location is used.

**What happens when the fulfilment location does not match a Linnworks stock location?**

The stock update cannot be completed correctly for that order, and the issue should be reviewed in the execution logs.

**Are service items processed?**

No. Service items are skipped.

**What happens when an item has a blank SKU?**

The item is skipped.

**How are normal items processed?**

The macro reduces stock for the order item SKU using the ordered quantity as a negative adjustment.

**How are composite items processed?**

The component items are processed instead of the parent composite SKU.

**How does the macro prevent duplicate deductions?**

It checks stock item history for a matching order-reference note before applying the update.

**What is the stock movement note format?**

The note follows this format:

`Order {OrderNumber} ref: {ReferenceNumber}`

**What happens when the note already exists?**

The stock adjustment is skipped.

**What happens when the note does not exist?**

The macro reduces the stock level and saves the order-reference note with the movement.

**Does the macro process orders from previous UTC days?**

The documented search covers only the current UTC day.

**What should be checked when an order is not processed?**

Confirm that the order was processed during the current UTC day, contains the SHOPIFY\_POS property, and has a valid fulfilment location.

**What should be checked when stock is not reduced?**

Confirm that the item is not a service line, has a valid SKU, and does not already have the matching order-reference note in its stock history.

**What should be checked when a composite item's stock looks different?**

Review the component items because the macro reduces the composite sub-items rather than the parent SKU.

## Legal Information

- **Privacy Policy:** [https://rishvi.co.uk/privacy-policy/](https://rishvi.co.uk/privacy-policy/)
- **Terms and Conditions:** [https://rishvi.co.uk/terms-conditions/](https://rishvi.co.uk/terms-conditions/)

Please review these pages to understand how data is handled and the terms governing the use of this application.

## Summary

Shopify POS Location Stock Deduction automates stock reductions for eligible Shopify POS orders processed in Linnworks during the current UTC day.

Once scheduled and enabled, the macro searches processed orders, validates the SHOPIFY\_POS extended property, matches the fulfilment location, evaluates normal and composite order items, checks stock history for duplicates, and applies negative stock adjustments where required.

<Columns cols="2">
  <Card title="Automated processed-order search" icon="search" horizontal="false" target="_self">
    The macro searches the current UTC day's processed orders automatically.
  </Card>

  <Card title="Location-level stock updates" icon="map-pin" horizontal="false" target="_self">
    Eligible stock is reduced at the fulfilment location recorded against the order.
  </Card>

  <Card title="Composite-aware deductions" icon="boxes" horizontal="false" target="_self">
    Composite component items are reduced instead of the parent product.
  </Card>

  <Card title="Duplicate adjustment protection" icon="shield-check" horizontal="false" target="_self">
    Existing order-reference notes in stock history prevent repeated stock reductions.
  </Card>
</Columns>

For orders that do not update as expected, review the macro execution logs, confirm that the order was processed during the current UTC day, verify the SHOPIFY\_POS extended property, and check that the fulfilment location matches an active Linnworks stock location.
