Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Configuration page

API configuration

Site ID: Your OneStock Site ID
API Url: Should be either

API User: The api user that has been created for your project
API Password: The API password that has been created for your project

Once your credentials saved, you will have access to more configurations.

image-20250208-142249.png

Sales channels

For each of your stores, you will need to map it to a OneStock sales channel. A dropdown with the available sales channels configured in OneStock will allow you to do so.

image-20250208-142521.png

Stock Requests and Cron Schedules

For each of your commercetools channel, you need to configure stock request settings and define the cron schedules for stock imports. Below are the required steps:

1. Full Stock Request

Each store must have a full stock request assigned. This request is used to import the complete stock data for that channel.

  • Example: export_unified_web_fullexport_warehouses_full

2. Delta Stock Request

A delta stock request should also be assigned for each store. This request is used to import only the stock changes (differences) since the last import.

  • Example: export_unified_web_diff

3. Full Stock Import Schedule

You must define a specific time at which the full stock import will be executed every day. This is a single daily execution.

  • Example: HH:mm AM/PM

4. Delta Stock Import Schedule

For delta stock updates, you must set up a cron schedule specifying:

  • Frequency: How often the delta stock import should run (e.g., every hour).

  • Start Time: The time from which the delta imports begin each day.

  • End Time: The time until which the delta imports are allowed to run.

image-20250208-142535.png

Synchronization page

The Onestock Synchronization page allows users to manage the synchronization of products and stock between their system and OneStock. The page consists of two main sections:

  1. Exporting products to OneStock

  2. Importing stock from OneStock

Note that published products will also be automatically updated in OneStock.

image-20250208-142606.png

Mapping page

The mapping page enables users to map fields from OneStock's order data to the corresponding fields in Commercetools' order data. The mapping allows you to ensure that both systems can communicate effectively by synchronizing order data between them.

The mapping form consists of the following elements:

  • Onestock Source Field: The field from the Onestock order JSON that you wish to map. You can select any field available in the Onestock order data structure.

  • Commercetools Target Field: The field in the Commercetools order JSON where the Onestock source data will be mapped to. This field can be selected to match the corresponding structure in Commercetools.

For instance, suppose you have this json delivery promise data from OneStock in one of your custom field named delivery_promise:

{
      "delivery_promise":{
        "original_delivery_option":{
          "carbon_footprint":10,
          "cost":10,
          "cutoff":1733090400,
          "delivery_method":"Home Delivery Standard Singapore",
          "destination":{
              "location":{
                "country":"SG",
                "zip_code":"322149"
              }
          },
          "eta_end":1733832001,
          "eta_start":1733367597,
          "metric_values":{
              "shipping_fees":5
          },
          "shipment_number":1,
          "delivery_routes":[
              {
                "carrier":{
                    "name":"dhlv2",
                    "option":"express"
                },
                "items":[
                    {
                      "id":"1000000003",
                      "quantity":1
                    }
                ]
              }
          ],
          "status":"valid"
        },
        "sent_delivery_option":{
          "eta_start":1733367597,
          "eta_end":1733832001
        }
    }
}

And you want to map this in delivery_promise key in onestock order, the mapping will be:

Onestock Source Field: delivery_promise Commercetools Target Field: custom.fields.delivery_promise

image-20250208-142635.png

Jobs page

This section provides an overview of stock export and product import jobs.

Stock Export Jobs

Displays a list of stock export jobs with the following columns:

  • Export ID: Unique identifier for each export job.

  • Type: Type of stock export (either 'full' or 'diff').

  • Request Name: Name of the stock request associated with the export.

  • Channel Key: The key for the channel.

  • Channel ID: The ID of the channel.

  • Status: Current status of the export job.

Product Import Jobs

Displays a list of product import jobs with the following columns:

  • Job ID: Unique identifier for each import job.

  • Trigger Type: The type of trigger that initiated the job.

  • Status: Current status of the import job.

image-20250208-142656.png

  • No labels