Patchworks pulls fulfilled orders from Shopify and the dispatch is then sent to Virtualstock Supplier, with the associated tracking number.
We pull newly updated orders with a fulfilled
or partially-fulfilled
status and filters on source_name
= VS_Patchworks
for sales orders.
The operations count for this process flow is: 2 per fulfillment.
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.
Shape | Notes |
---|---|
Script | Summary |
---|---|
Cross-reference lookup | Summary |
---|---|
Trigger
Having installed the blueprint, edit this shape and define your preferred run schedule. Please see the installation guide for specific notes.
Connector
This shape includes parameters that you should review/update. Please see the installation guide for specific notes.
Source instance
: Shopify
Source endpoint
: GET Retrieve a list of orders
Parameters
: created_at_min
financial_status
status
fulfillment_status
updated_at_min
Filter
There should be no need to change any settings for this shape. For reference, required settings are:
Source instance
: N/A
Source endpoint
: N/A
Filters
: Set as: *.source_name
string
equals
VS_Patchworks
Keep matching
: ON
Flow control
There should be no need to change any settings for this shape. For reference, required settings are:
Source instance
: N/A
Source endpoint
: N/A
Batch level
: *
Batch size
: 1
Script
These settings should not be changed. For reference, required settings are:
Script
: Save Order URI ID to Meta Var
Version
: v5 (latest)
Flow control
There should be no need to change any settings for this shape. For reference, required settings are:
Source instance
: N/A
Source endpoint
: N/A
Batch level
: *.fulfillments
Batch size
: 1
De-dupe
There should be no need to change any settings for this shape. For reference, required settings are:
Source instance
: N/A
Source endpoint
: N/A
Entity
: Fulfillments
Behaviour
: Filter records
Data Pool
: FulfillmentOrder
Key field
: *.id
Behaviour
: JSON
Add to cache
These settings should not be changed. For reference, required settings are:
Cache
: (Flow run) FulfillmentOrder
Cache key
: FulfillmentOrder
Append
: OFF
Save all pages
: ON
Map
Generally, field mappings should not be changed. However please refer to the installation guidelines for this process flow for any fields that are noted for special attention.
Source instance
: None
Source endpoint
: None
Connector
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:
Source instance
: Virtualstock Supplier
Source endpoint
: POST Dispatch an order
Variables
: Set as OrderURI
/ [[meta.JLorderId]]
Load from cache
These settings should not be changed. For reference, required settings are:
Cache
: (Flow run) FulfillmentOrder
Cache key
: FulfillmentOrder
Fail on cache miss
: OFF
Load all pages
: ON
De-dupe
There should be no need to change any settings for this shape. For reference, required settings are:
Source instance
: N/A
Source endpoint
: N/A
Entity
: Fulfillments
Behaviour
: Track records
Data Pool
: FulfillmentOrder
Key field
: *.id
Behaviour
: JSON
Save Order URI ID to Meta Var
Extracts URI from Shopify notes.
Carrier map
Maps Shopify tracking companies to Virtualstock carriers (and vice versa). You need to update this table with your own values - please see the installation guide for details.
SKU Lookup
Maps Virtualstock Supplier part numbers to Shopify SKUs. You need to update this table with your own values - please see the installation guide for details.
Sales orders are pulled from Virtualstock Supplier and created in Shopify with a paid
and unfulfilled
status. Finally, an acknowledgement is sent back to Virtualstock Supplier.
Any orders with an ORDER
status are pulled from Virtualstock Supplier. Once an order is successfully sent into Shopify, we send an ORDER_ACK
back to Virtualstock Supplier - the order is then moved into ORDER_ACK
status so that it won't be picked up in subsequent flow runs.
The operations count for this process flow is: 4 per order.
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.
This process flow retrieves the product listing associated with the Patchworks sales channel that you defined in Shopify, and then updates Virtualstock Supplier with new stock levels:
It's important to ensure that ONLY SKUs that you want to sync with Virtualstock Supplier are associated with the Patchworks app sales channel in Shopify - otherwise processing time will be longer.
Any SKUs pulled from Shopify are checked against the SKU Lookup cross-reference table and mapped to the relevant Virtualstock Supplier part number.
Then, Patchworks makes a call to Virtualstock Supplier to retrieve the product by part number (this is needed to obtain the associated URL ID
of the product). We then use the URL ID
to make a second call into Virtualstock Supplier to update the stock level.
The operations count for this process flow is: 3 per sync.
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.
Shape | Notes |
---|---|
Script | Summary |
---|---|
Cross-reference lookup | Summary |
---|---|
Shape | Notes |
---|---|
Script | Summary |
---|---|
Cross-reference lookup | Summary |
---|---|
Trigger
Having installed the blueprint, edit this shape and define your preferred run schedule. Please see the installation guide for specific notes.
Connector
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:
Source instance
: Virtualstock Supplier
Source endpoint
: GET List orders
Variables
: Set as Status
/ ORDER
Flow control
There should be no need to change any settings for this shape. For reference, required settings are:
Source instance
: Virtualstock Supplier
Source endpoint
: GET List orders
Batch level
: *
Batch size
: 1
Map
Generally, field mappings should not be changed. However please refer to the installation guidelines for this process flow for any fields that are noted for special attention.
Source instance
: None
Source endpoint
: None
Add to cache
These settings should not be changed. For reference, required settings are:
Cache
: (Flow run) VSSalesOrder
Cache key
: VSSalesOrder
Append
: OFF
Save all pages
: OFF
Script
These settings should not be changed. For reference, required settings are:
Script
: SKU Search Script
Version
: v3 (latest)
Connector
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:
Source instance
: Shopify
Source endpoint
: POST Get VariantID by SKU - GraphQL
Variables
: Set as Query String
/ [[payload.productCodeString]]
Add to cache
These settings should not be changed. For reference, required settings are:
Cache
: (Flow run) VSSalesOrder
Cache key
: VSSalesOrder
Append
: ON
Path to append to
: SKUData
Save all pages
: OFF
Load from cache
These settings should not be changed. For reference, required settings are:
Cache
: (Flow run) VSSalesOrder
Cache key
: VSSalesOrder
Fail on cache miss
: OFF
Load all pages
: OFF
Script
These settings should not be changed. For reference, required settings are:
Script
: Match Shopify Variant to SKU
Version
: v3 (latest)
Connector
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:
Source instance
: Shopify
Source endpoint
: POST Create an order
Route
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:
Source instance
: Virtualstock Supplier
Source endpoint
: N/A
Routing method
: Follow all matching routes
Route 1
: No Errors
Route 2
: Error
Route 1
Payload fields
: order.id
Type
: Null comparison
Operator
: Not NULL
Keep matching
: ON
Route 2
Payload fields
order.id
Type
: Null comparison
Operator
: Is NULL
Keep matching
: ON
(Route 1) Script
These settings should not be changed. For reference, required settings are:
Script
: Save Order URI ID to Meta Var
Version
: v6 (latest)
(Route 1) Map
Generally, field mappings should not be changed. However please refer to the installation guidelines for this process flow for any fields that are noted for special attention.
Source instance
: None
Source endpoint
: None
(Route 1) Connector
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:
Source instance
: Virtualstock Supplier
Source endpoint
: POST Acknowledge an order
Variables
: Set as Order URI
/ [[meta.VSorderId]]
(Route 2) Connector
These settings should not be changed. For reference, required settings are:
Expected Payload
: Order failed to create if reached here.
Phone Number Formatter
Corrects formatting for UK telephone numbers.
SKU Search Script
Creates GraphQL input for Shopify.
Match Shopify Variant Id to SKU
Replaces sales order SKUs with variant Ids.
Save Order URI ID to Meta Var
Extracts URI from Shopify notes.
Calculate dispatch date using orderDate
Takes Shopify's order created date and adds 5 days to calculate the supplier delivery date. If required, you can change the number of days used for this calculation - please see the installation guide for details.
Carrier map
Maps Shopify tracking companies to Virtualstock carriers (and vice versa). You need to update this table with your own values - please see the installation guide for details.
SKU Lookup
Maps Virtualstock Supplier part numbers to Shopify SKUs. You need to update this table with your own values - please see the installation guide for details.
Trigger
Having installed the app, edit this shape and define your preferred run schedule. The default setting is to run twice per day at 08:05 a.m. and 06:05 p.m. Please see the installation guide for specific notes.
Connector
This shape includes parameters that you should review/update. Please see the installation guide for specific notes.
Source instance
: Shopify
Source endpoint
: GET Retrieve product listings that are published to your app
Parameters
: updated_at_min
Script
These settings should not be changed. For reference, the required settings are:
Script
: Replace negative qtys with 0
Version
: v1 (latest)
Flow control
There should be no need to change any settings for this shape. For reference, the required settings are:
Source instance
: N/A
Source endpoint
: N/A
Batch level
: *
Batch size
: 1
Flow control
There should be no need to change any settings for this shape. For reference, the required settings are:
Source instance
: N/A
Source endpoint
: N/A
Batch level
: *.variants
Batch size
: 1
Set variables
There should be no need to change any settings for this shape. For reference, the required settings are:
Meta
: Set as key
: sku
value
: [[payload.0.sku]]
Add to cache
These settings should not be changed. For reference, the required settings are:
Cache
: (Flow run) ShopifyVariantStockLevel
Cache key
: ShopifyVariantStockLevel.[[payload.0.sku]]
Append
: OFF
Save all pages
: OFF
Map
Generally, field mappings should not be changed. However please refer to the installation guidelines for this process flow for any fields that are noted for special attention.
Source instance
: None
Source endpoint
: None
Filter
There should be no need to change any settings for this shape. For reference, the required settings are:
Source instance
: N/A
Source endpoint
: N/A
Filters
: Set as: *.part_number
string
not equals
0
Keep matching
: ON
Connector
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:
Source instance
: Virtualstock Supplier
Source endpoint
: GET Retrieve a product by part number
Variables
: Set as part number
/ [[payload.0.part_number]]
Add to cache
These settings should not be changed. For reference, required settings are:
Cache
: (Flow run) ShopifyVariantStockLevel
Cache key
: ShopifyVariantStockLevel.[[meta.sku]]
Append
: ON
Save all pages
: OFF
Load from cache
These settings should not be changed. For reference, the required settings are:
Cache
: (Flow run) ShopifyVariantStockLevel
Cache key
: ShopifyVariantStockLevel.[[meta.sku]]
Fail on cache miss
: OFF
Load all pages
: OFF
Script
These settings should not be changed. For reference, the required settings are:
Script
: Extract ProductId from URL
Version
: v3 (latest)
Map
Generally, field mappings should not be changed. However please refer to the installation guidelines for this process flow for any fields that are noted for special attention.
Source instance
: None
Source endpoint
: None
Connector
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:
Source instance
: Virtualstock Supplier
Source endpoint
: PATCH Update stock availability
Variables
: Set as Product Rest Id
/ [[meta.productId]]
Replace negative qtys with 0
Replaces negative inventory quantities to zero quantities
Extract ProductId from URL
Extracts the URI from product details
SKU Lookup
Maps Virtualstock Supplier part numbers to Shopify SKUs. You need to update this table with your own values - please see the installation guide for details.