# Shopify & Virtualstock Supplier

## Overview <a href="#overview" id="overview"></a>

The *Shopify & Virtualstock Supplier* blueprint includes everything you need to sync orders, fulfillments, and inventory between *Virtualstock Supplier* and *Shopify.* The high-level architecture is illustrated below:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2F0Vzo4hRsqRZaHWv5ymCK%2Foverview%20image%203.png?alt=media&#x26;token=1d697341-5491-43c4-a56a-074f55c186fa" alt=""><figcaption></figcaption></figure>

Orders are pulled from *Virtualstock Supplier* and created in Shopify with a `paid` and `unfulfilled` status. When a fulfilment partner ships an order in Shopify, Patchworks pulls shipment information and sends this (together with a tracking number) to *Virtualstock Supplier*. Finally, inventory is synced from Shopify to *Virtualstock Supplier*.

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

| Item                                                                                               | Notes                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Virtualstock & Shopify staging/sandbox credentials                                                 | Virtualstock Supplier credentials are provided by the associated Virtualstock merchant- e.g.  John Lewis.                                                                                                                                                                       |
| Virtualstock & Shopify live/production credentials                                                 | Virtualstock Supplier credentials are provided by the associated Virtualstock merchant- e.g.  John Lewis.                                                                                                                                                                       |
| List of all Shopify SKUs and corresponding Virtualstock Supplier part numbers                      | This will usually be in the form of a spreadsheet that's issued by the *Virtualstock Supplier* merchant. For example, John Lewis provide a spreadsheet named *Smartsheet* or *JL SKU*s. Note: for testing, you only require enough SKUs/part numbers to fulfill required tests. |
| List of Shopify carriers that will be used for Virtualstock Supplier orders                        | The Slug for these carriers is usually provided by the Virtualstock Supplier merchant (e.g. John Lewis).                                                                                                                                                                        |
| Test scenarios                                                                                     | Some Virtualstock merchants mandate specific test scenarios - for example, John Lewis require three  test orders to be processed before live/production credentials are released.                                                                                               |
| Confirmation of predefined values to be used for acknowledgement back to  *Virtualstock Supplier*. | <p></p><ul><li><code>Supplier\_delivery\_date</code>. This is usually <code>orderdate</code> plus 5-7 days</li><li><code>Fulfillment\_route</code>. This is usually set to <code>Direct to customer</code>.</li></ul>                                                           |

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

In Patchworks, an [operation](https://doc.wearepatchworks.com/product-documentation/company-management/company-insights/company-insights-overview/about-operations) is counted whenever a request is made to send or receive a payload to/from an endpoint. The operations count for installed process flows is shown below:

| Process flow                                                                                                                                                                                                                                      | Operations count  | Default run frequency\* |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ----------------------- |
| [Orders](https://doc.wearepatchworks.com/product-documentation/blueprints/patchworks-blueprints/shopify-and-virtualstock-supplier/available-process-flows-shopify-and-virtualstock-supplier/orders-shopify-and-virtualstock-supplier)             | 4 per order       | Every 10 minutes        |
| [Fulfillments](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) | 2 per fulfillment | Hourly                  |
| [Inventory](https://doc.wearepatchworks.com/product-documentation/blueprints/patchworks-blueprints/shopify-and-virtualstock-supplier/available-process-flows-shopify-and-virtualstock-supplier/inventory-shopify-and-virtualstock-supplier)       | 3 per sync        | 2 x daily               |

<mark style="color:red;">\*</mark> You can change the frequency at which process flows run - please see our [installation guide](https://doc.wearepatchworks.com/product-documentation/blueprints/patchworks-blueprints/shopify-and-virtualstock-supplier/installation-guide-shopify-and-virtualstock-supplier) for details.

## Blueprint installation & setup <a href="#app-installation-and-setup" id="app-installation-and-setup"></a>

Please see our [installation guide](https://doc.wearepatchworks.com/product-documentation/blueprints/patchworks-blueprints/shopify-and-virtualstock-supplier/installation-guide-shopify-and-virtualstock-supplier).

## Available process flows

Please see our [available process flows](https://doc.wearepatchworks.com/product-documentation/blueprints/patchworks-blueprints/shopify-and-virtualstock-supplier/available-process-flows-shopify-and-virtualstock-supplier) section.

## Out of Scope

* Cancellations both from Virtualstock Supplier and From Shopify
* Returns/Refunds
* Product Creation
* Lead Time updates to Virtualstock Supplier
