# Fulfillments (Shopify & Virtualstock Supplier)

## Introduction

Patchworks pulls fulfilled orders from Shopify and the dispatch is then sent to *Virtualstock Supplier*, with the associated tracking number.

<figure><img src="/files/ILKL3sYUXJrby070lWqY" alt=""><figcaption></figcaption></figure>

We pull newly updated orders with a `fulfilled` or `partially-fulfilled` status and filters on `source_name` = `VS_Patchworks` for sales orders.

## Process flow snapshot

<details>

<summary><img src="/files/y1IE71BfODU6ZRj1HNMM" alt="" data-size="line"> Process flow snapshot</summary>

![](/files/HjcpqtflxRITEqkQw9w4)

</details>

## Operations count <a href="#app-installation-and-setup" id="app-installation-and-setup"></a>

The operations count for this process flow is: **2 per fulfillment**.

## Process flow shapes

For reference, all shapes in this process flow are documented below. Do not change shape settings unless advised to do so in our [installation guide](/product-documentation/blueprints/patchworks-blueprints/shopify-and-virtualstock-supplier/installation-guide-shopify-and-virtualstock-supplier.md). &#x20;

<table data-full-width="false"><thead><tr><th width="270">Shape</th><th>Notes</th></tr></thead><tbody><tr><td>Trigger</td><td>Having installed the blueprint, edit this shape and define your preferred run schedule. Please see the <a href="/pages/ZjpoQHOfkC2ZONUcUZzJ">installation guide</a> for specific notes.</td></tr><tr><td>Connector</td><td>This shape includes parameters that you should review/update. Please see the <a href="/pages/ZjpoQHOfkC2ZONUcUZzJ">installation guide</a> for specific notes.<br><br><code>Source instance</code>: Shopify <br><code>Source endpoint</code>: GET Retrieve a list of orders<br><code>Parameters</code>:  <code>created_at_min</code>  <code>financial_status</code> <code>status</code> <code>fulfillment_status</code> <code>updated_at_min</code></td></tr><tr><td>Filter</td><td><p>There should be no need to change any settings for this shape. For reference, required settings are:<br></p><p><code>Source instance</code>: N/A <br><code>Source endpoint</code>: N/A<br><code>Filters</code>: Set as: <code>*.source_name</code> <code>string</code> <code>equals</code> <code>VS_Patchworks</code><br><code>Keep matching</code>: ON</p></td></tr><tr><td>Flow control</td><td><p>There should be no need to change any settings for this shape. For reference, required settings are:<br><br><code>Source instance</code>: N/A <br><code>Source endpoint</code>: N/A</p><p><code>Batch level</code>: *<br><code>Batch size</code>: 1</p></td></tr><tr><td>Script</td><td>These settings should not be changed. For reference, required settings are:<br><br><code>Script</code>: Save Order URI ID to Meta Var<br><code>Version</code>: v5 (latest) </td></tr><tr><td>Flow control</td><td><p>There should be no need to change any settings for this shape. For reference, required settings are:<br><br><code>Source instance</code>: N/A <br><code>Source endpoint</code>: N/A</p><p><code>Batch level</code>: *.fulfillments<br><code>Batch size</code>: 1</p></td></tr><tr><td>De-dupe</td><td><p>There should be no need to change any settings for this shape. For reference, required settings are:<br><br><code>Source instance</code>: N/A <br><code>Source endpoint</code>: N/A</p><p><code>Entity</code>: Fulfillments<br><code>Behaviour</code>: Filter records</p><p><code>Data Pool</code>: FulfillmentOrder<br><code>Key field</code>: *.id<br><code>Behaviour</code>: JSON</p></td></tr><tr><td>Add to cache</td><td>These settings should not be changed. For reference, required settings are:<br><br><code>Cache</code>: (Flow run) FulfillmentOrder<br><code>Cache key</code>: FulfillmentOrder<br><code>Append</code>: OFF<br><code>Save all pages</code>: ON</td></tr><tr><td>Map</td><td>Generally, field mappings should not be changed. However please refer to the <a href="/pages/XtrYjDFFWlwZYnGBUkCq">installation guidelines for this process flow</a> for any fields that are noted for special attention.<br><br><code>Source instance</code>: None <br><code>Source endpoint</code>: None</td></tr><tr><td>Connector</td><td>If instance credentials are provided as part of the blueprint installation, there should be no need to change any settings for this shape. For reference, the required settings are:<br><br><code>Source instance</code>: Virtualstock Supplier <br><code>Source endpoint</code>: POST Dispatch an order<br><code>Variables</code>: Set as <code>OrderURI</code> / <code>[[meta.JLorderId]]</code></td></tr><tr><td>Load from cache</td><td>These settings should not be changed. For reference, required settings are:<br><br><code>Cache</code>: (Flow run) FulfillmentOrder<br><code>Cache key</code>: FulfillmentOrder<br><code>Fail on cache miss</code>: OFF<br><code>Load all pages</code>: ON</td></tr><tr><td>De-dupe</td><td><p>There should be no need to change any settings for this shape. For reference, required settings are:<br><br><code>Source instance</code>: N/A <br><code>Source endpoint</code>: N/A</p><p><code>Entity</code>: Fulfillments<br><code>Behaviour</code>: Track records</p><p><code>Data Pool</code>: FulfillmentOrder<br><code>Key field</code>: *.id<br><code>Behaviour</code>: JSON</p></td></tr></tbody></table>

## Scripts used in this process flow

<table><thead><tr><th width="293">Script</th><th>Summary</th></tr></thead><tbody><tr><td>Save Order URI ID to Meta Var</td><td>Extracts URI from Shopify notes.</td></tr></tbody></table>

## Cross-reference lookups used in this process flow

<table><thead><tr><th width="293">Cross-reference lookup</th><th>Summary</th></tr></thead><tbody><tr><td>Carrier map</td><td>Maps Shopify tracking companies to Virtualstock carriers (and vice versa). You need to update this table with your own values - please see the <a href="/pages/tubsOpI5uT37oJDkTZbf">installation guide</a> for details.</td></tr><tr><td>SKU Lookup</td><td>Maps <em>Virtualstock Supplier</em> part numbers to Shopify SKUs. You need to update this table with your own values - please see the <a href="/pages/tubsOpI5uT37oJDkTZbf">installation guide</a> for details.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/blueprints/patchworks-blueprints/shopify-and-virtualstock-supplier/available-process-flows-shopify-and-virtualstock-supplier/fulfillments-shopify-and-virtualstock-supplier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
