In this stage you will access the [[Orders]] Virtualstock >> Shopify process flow.
The process flow is pre-configured with all required settings, including any connector instances you defined as part of the installation stage. On this page, we guide you through recommended checks so you can ensure the flow meets your requirements.
Step 1 Select process flows > process from the left-hand navigation menu (or click here). Your process flow list is displayed - for example:
If you've used Patchworks before installing the Shopify & Virtualstock Supplier blueprint, you might see more than the three process flows shown here.
Step 2 Click the [[Orders]] Virtualstock >> Shopify entry to open the process flow in edit mode.
Step 3 Access settings for the trigger shape and edit the default schedule to reflect the frequency you want this process flow to run:
For guidance on defining trigger schedules, please see our Trigger shape page.
Any schedule you define here won't affect the number of new orders received - just how frequently you collect them.
New orders are determined by order status (rather than any time-based conditions). When the process flow runs, any orders with an ORDER
status are pulled from Virtualstock Supplier and sent into Shopify - you can see this if you check the settings for the first connector shape in the flow:
When this operation is completed successfully, the order changes to an ORDER_ACK
status, so it will never be picked up again in subsequent flow runs.
Step 4 Access settings for the first map shape and scan down the list to ensure the default settings meet your requirements. Here we are mapping FROM Virtualstock Supplier TO Shopify.
Generally, default mappings do not need to be changed however, the following fields should be checked with particular care and changes can be made if necessary:
Order.Inventory_behaviour
part_number
> variant_id
The following fields must NOT be changed:
Order Line Properties
Order notes
Order source_name
If you would like to map additional fields (for example, billing address), this is fine. For guidance on defining field mappings, please see our Working with field mappings page.
Step 5 Access settings for the second map shape and scan down the list to ensure the default settings meet your requirements. Here we are mapping FROM Shopify TO Virtualstock Supplier.
Generally, default mappings do not need to be changed however, the following fields should be checked with particular care:
supplier_delivery_date
Fulfillment_route
This attribute is used to send an acknowledgement back to Virtualstock Supplier after an order is created in Shopify.
It should not be necessary to map additional fields here.
Step 6 In Virtualstock Supplier, make sure you have some test orders (with an ORDER status) using part numbers that you added to the SKU lookup table previously.
Step 7 Access settings for every connector shape in the flow (there are four) and double-check that the source instance is for a sandbox environment - for example:
Step 8 When you're satisfied that the flow is ready to test, click the initialise flow button from the actions bar:
The process flow should run and complete successfully. Check that the outcome is as expected in Shopify and Virtualstock Supplier.
Step 9 Go to the next stage.
This affects your Shopify stock levels, and whether or not you will allow Shopify to receive the order if Shopify is out of stock. The default setting is: decrement_obeying_policy
. For more information, please see .
This field mapping uses a cross-reference-lookup transform function to convert Shopify SKUs to Virtualstock Supplier part numbers. Make sure that your has been updated accordingly.
The supplier delivery date is generated using a script transform function on this field. Here, we call the , which calculates the supplier delivery date by adding a given number of days to the order creation date.
By default, 5
days are added. If you want to change this value, see .
By default, a custom string transform sends a text value of: Direct to customer
. If necessary, you can change this value by editing the transform function. For guidance, please see our page.
The Orders process flow includes a field mapping which takes Shopify's order.created_at
date and (via a script transform function on the mapping row) adds 5 days
before sending this to Virtualstock Supplier as the supplier_delivery_date
.
The 5 days
that gets added here can be changed by amending the script that is used by the script transform function on the mapping row.
The required steps are detailed below:
Step 1 Select process flows > scripts from the left-hand navigation menu (or click here).
Step 2 Click the Calculate dispatch date using orderDate entry:
Step 3
Move down to the code panel and change the existing 5 days
to your required number:
Do not make any other changes!
Step 4 Save and deploy the script:
Step 1 Select process flows > process flows from the left-hand navigation menu (or click here).
Step 2 Access the Orders process flow.
Step 3 Scroll down the flow and access settings for the LAST map shape:
Step 4
Click the transform icon associated with the order.created_at
> supplier_delivery_date
row:
Step 5 Click the edit icon associated with the other script function:
Step 6 Select the latest version of the Calculate dispatch date using orderDate script:
Step 7 Accept changes and save the shape.