Orders (Shopify & Virtualstock Supplier)

Introduction

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.

Process flow snapshot

Process flow snapshot

Operations count

The operations count for this process flow is: 4 per order.

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.

Shape
Notes

Trigger

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

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

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

Scripts used in this process flow

Script
Summary

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

Cross-reference lookups used in this process flow

Cross-reference lookup
Summary

Carrier map

SKU Lookup

Last updated