Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

1. Installation

The OneStock connector is available on the Shopify marketplace. To install the OneStock connector, you need a Shopify Plus shop.

...

You’ll be redirected on your shop admin and asked to install the connector.

...

2. Configuration

...

page

The configuration of the connector is done directly on the shop admin page.

2.1. General API configuration

Go to your configuration page and fill the mandatory fields:

  • site id : your OneStock site id

  • host : should be either

    • production : https://api.onestock-retail.com

    • qualification : https://api-qualif.onestock-retail.com

    • training : https://api-qualiftraining.onestock-retail.com

    • other : if your OneStock instance is hosted elsewhere, your project manager will inform you of the value to be used.

  • user id and password : the api user credentials that have been created for the project.

  • Synchronize order : check if your project needs order synchronization

...

Once your credential saved, you will have access to more configurations and also to two admin pages : Synchronization and Carrier services.

...

2.2 Order synchronization

If checked, the connector will listen to all orders created in shopify Shopify to create them in OneStock.

It will also subscribe create a webhook to listen to 3 webhookstopics in OneStock:

  • order_state_changed

  • parcel_state_changed

  • line_item_group_state_changed

Those 3 webhooks let the connector update the order on Shopify when a line item is removed or when a parcel is dispatched.

parcel_state_changed:

The connector is listening to dispatched.

Extra configurations

Once the general configuration is set, the user gets access to more configurations and collected states of a parcel. If the parcel is at one of those state, the connector create a fulfillment for the related line items. (A fulfillment order represents a group of one or more items in an order that will be fulfilled from the same location.)

order_state_changed:

The connector is listening to removed and fulfilled states of an order.

If the order is at one of those state, the connector checks if there are items that need to be hold. In case there are items that need to be hold, it applies a fulfillment hold on the related fulfillment order.

line_item_group_state_changed:

The connector is listening to removed state of a line item. If the line item group is at this state, it applies a fulfillment hold on the related fulfillment order.

Rulesets Mapping (optional)

Map your Shopify delivery rate to a OneStock ruleset chaining you want your order to be orchestrated with.

...

Panel
panelIconId1f4a1
panelIcon:bulb:
panelIconText💡
bgColor#E6FCFF

For example, you can have a standard and express rate on Shopify that you will map to the same ruleset on OneStock for all home deliveries. But you’ll create an international delivery rate that will be orchestrated with another ruleset chaining

Sales channel (optional)

A dropdown will reveal available sales channel configured in OneStock. This value will be used for order creation but also for the delivery promise calls.

...

Info

You can only configure one sales channel for a shop if you are synchronizing your orders with the connector.

2.3. Stock configuration (optional)

SFTP Configuration

This is where you have to configure the sftp for stock export from OneStock to Shopify.
The values to enter will be specified by the owner of the SFTP that you are using.

Info

You should have the same configuration than the one set on OneStock Configuration > Data exchange.

image-20240715-121410.png

Location & Stock request mapping (optional)

This is to configure the stock export from OneStock to Shopify for full stock and delta stock.

Values to input here will be given by your OneStock Project managercontact.

...

Timezone (optional)

This is to configure the timezone you are using for your scheduled stock imports

image-20240715-121629.png

Rulesets Mapping (optional)

You’ll have to map each Shopify delivery rate to an existing ruleset chaining in OneStock if you are synchronizing your orders through the connector. This is useful if you have multiple ruleset chainings configured in OneStock.

...

2.4. Delivery promise

Delivery promises Mapping (optional)

If you have subscribed to OneStock delivery promise, you can display the delivery promise result on your checkout page under every Shopify delivery rate.

If click and collect is selected, we will display a store selection in your checkout with all stores having click and collect enabled with the delivery promise response.

...

Info

If you want a dynamic rate (e.g. only available depending on the items on the basket or on the delivery address) you should create a rate from our Carrier service instead of using Shopify delivery rates.

Default location for Delivery Promise (demo, don’t use)

The connector is shipped with a theme block to display every delivery promise configured on the delivery promise mapping. This block is used to call the delivery promise with the country and zip code inputted here when the theme block is activated on the product and basket pages.

...

3. Synchronization page

This page allows you to trigger a product synchronization or to trigger a stock import (full or diff).

...

3.1 Synchronize specific products

You can also use the products list or details pages on Shopify to filter the products you want to synchronize. A synchronize button is available on the more options button.

...

This synchronize button is also available on a specific product page

...

3.2 Synchronize orders

You can also force an order synchronization from the order list or an order detail page of Shopify through a more action button.

image-20241008-072646.pngImage Addedimage-20241008-072706.pngImage Added

4. Carrier services page

This page allows you to create a new delivery option based on a delivery promise route method from OneStock.

The standard delivery rate from Shopify doesn’t allow the connector to “hide” the delivery option based on the delivery promise response.

Thus, if a delivery option should be available to your customer only if our delivery promise says so method is dynamic (e.g. click and collect expressonly available depending on the items on the basket or on the delivery address), you have to create the rate from this page.

...

4.1 Create a rate

First, you have to make sure that the delivery promise route is configured and exists in OneStock.

...

  • Default Service name : the name that your customers will see in the checkout page.

  • Translations : if your shop supports multiple langages, you can translate the delivery option name that will be displayed on the checkout page here

  • Code : required by Shopify, this will be the rate code that is saved in the Shopify Order

  • Is C&C : if set to true, a list of stores that can fulfill the order will be displayed

  • Cost : you can set a fixed cost here. If not filled, we will use the cost returned by the delivery promise

  • Currency : set the currency of the cost

  • Delivery Promise Route : select the delivery route that is configured in OneStock

  • Ruleset (optional) : the ruleset chaining that will be posted to OneStock with the order.

...

5. Translation page

The connector displays the delivery promise for two types of messages on the checkout page: click and collect and home delivery.

...

There is an helper on the top right that explains the variables you can use but also some text transformers to display the dates in different formats

...

6. Documentation page

This page explains the two proxy routes opened by the connector. This is used so that you your system integrator can make a custom implementation of the delivery promise and do extra stock check before checkout.

Usage of those routes must be validated by your OneStock contact. The content of the paylods will be validated during your technical workshops.

...

7. Checkout extension and delivery promise

7.1. Display the delivery promise in the checkout

To display the delivery promise on your checkout page, you have to add our app block in your checkout page from the shopify admin.

...

  1. On the bottom left click on Add app block

...

  1. Select the `deliverydelivery-promise` promise app

...

  1. Don’t forget to save on the top right

...

Info

Previews from this page doesn’t work, so you have to test directly in your real checkout page

Retrieve the delivery promise data for your integration

...

delivery promise will be visible only in the checkout page of your online shop.

8. Metafield data for custom integration.

The connector populates an order metafield with the response we got in the checkout page.

...

8.1. Delivery promise data

You can use Shopify APIs to retrieve this information to correctly send it to OneStock in your own integration.create an order in OneStock if you are not using the order synchronization from the connector. This is to populate the delivery_promise parameter of the POST /orders API.

Expand
titleExample of delivery_promise metafield content
Code Block
[
    {
        "carbon_footprint": 100,
        "cost": 1,
        "cutoff": 1722224700,
        "delivery_method": "my_delivery_method_name",
        "destination": {
            "location": {
                "country": "FR",
                "zip_code": "31400"
            }
        },
        "eta_end": 1722524401,
        "eta_start": 1722322800,
        "shipment_number": 1,
        "delivery_routes": [
            {
                "carrier": {
                    "name": "carrier name",
                    "option": "standard"
                },
                "items": [
                    {
                        "id": "my_item_id",
                        "quantity": 1
                    }
                ]
            }
        ],
        "status": "valid",
        "code": "Standard",
        "delivery_promise_message": "The delivery promise displayed to the customer"
    }
]

8.2. Click and Collect data for custom integration

The selected store for click and collect is also stored on the delivery_promise metafield.

You can retrieve the store value to be used for your integration in destination.endpoint_id

Expand
titleExample of a delivery_promise metafield content with a click and collect destination
Code Block
{
    "carbon_footprint": 100,
    "cost": 1,
    "cutoff": 1722224700,
    "delivery_method": "ckc",
    "destination": {
        "endpoint_id": "my_store_id"
    },
    "eta_end": 1722524401,
    "eta_start": 1722326400,
    "shipment_number": 1,
    "delivery_routes": [
        {
            "carrier": {
                "name": "carrier name",
                "option": "standard"
            },
            "items": [
                {
                    "id": "my_item_id",
                    "quantity": 1
                }
            ]
        }
    ],
    "status": "valid",
    "code": "ckc",
    "delivery_promise_message": "the delivery promise message"
}