The sales channel represents where you sell your products. Sales channels apps help you to integrate your sales channels with Eshopbox. A private app is created if you are building a custom integration for a particular workspace and not for a general larger audience.
This guide will outline step by step process how you can build an app on the Eshopbox platform to connect with your custom sales channel.
Before you start
You should authenticate your app using OAuth. Make sure you included following scopes while requesting authorization code:
Your app will need the auto-generated sales channel code while creating orders, returns, etc.
Step 2: Sync Products and Inventory
You add new products to your sales channel catalog.
New products should be configured in your Eshopbox workspace as well. Your app should verify if these products are already configured in Eshopbox.
If the product is already configured, your app should mark the product as available on the Sales Channel. This will ensure the app can track the change in the inventory level of this product.
If no, your app should configure the product in your Eshopbox workspace and mark it available on your sales channel.
Now, your app should track inventory changes in the Eshopbox fulfillment Center and update such changes in your sales channel catalog.
While updating inventory in your sales channel catalog, your app should be able to make adjustments for any orders you have received on the sales channel but not yet sent for fulfillment to Eshopbox.
Syncing products to Eshopbox
Following are the steps that need to be implemented in your app to automate syncing products to Eshopbox
Your app should be able to track whenever there is a new product added to your sales channel catalog.
Your app should search for the product in the Eshopbox workspace. To search for products, send a GET request to products endpoint
where {workspace}, is workspace name and {productSku} is Name of the Product (SKU)
Check for a condition if the product exists in Eshopbox. If the product doesn't exist in Eshopbox then it returns an error message "Failed: Name of the product(SKU) does not exist"
Configure a new product in Eshopbox by sending a POST request to Products endpoint
where {workspace} is your workspace name. Eshopbox verifies the request body and creates a draft product in case any of the mandatory information is missing or incorrect. Such draft products are visible in the Eshopbox workspace and you can edit the product to add mandatory fields or make corrections.
The customer places an order on your Sales channel. You verify if the payment is captured in case of a prepaid order, or verify contact information or any other checks in case of Pay On Delivery order.
You send all the confirmed orders to Eshopbox for fulfillment.
Eshopbox will plan shipments for the order. Sometimes multiple shipments are created against a single order. This can happen for various reasons
if the inventory for the ordered product is not available in one location
all the items can’t be fit into one shipment due to packaging restrictions
one of the items is not available and may be shipped later.
Eshopbox will start processing the items and create an invoice for each shipment.
Eshopbox will assign the shipping provider and mark it as Ready to Ship.
Once the shipping provider picks up the shipment from Eshopbox FC, it will be marked as Shipped.
Eshopbox tracks the status of the shipment in the shipping provider network
The shipping provider delivers the shipment.
At any of the steps if Eshopbox may sideline the order if
the inventory is not available for items ordered
the shipping address in the order is not serviceable
You may get in touch with the customer and make appropriate changes to order so that it can be fulfilled.
Submit an order for fulfillment
Following are the steps that need to be implemented in your app to automate the submission of orders for fulfillment
Track for any new confirmed orders on your sales channel.
Submit this order for fulfillment to Eshopbox by sending a POST request to the Order endpoint.
http://wms.eshopbox.com/api/order
please use auto-generated channel code as created in the Eshopbox workspace while enabling a new sales channel. (LINK)
Make sure your pricing information submitted along with order complies for following cases -
Eshopbox will send updates to the registered webhook URL whenever a shipment is created, canceled, delayed, delivered, in transit, dispatched, delivery is failed, out for delivery, packed, pickup pending, return to origin(RTO), RTO in transit.
Event Subtypes corresponding to which Eshopbox will send updates.
When a customer cancels the order, your app is required to send a cancellation request to Eshopbox.
Eshopbox will process the cancellation and send an update to your app.
Eshopbox may cancel the order when inventory is not available or the address is not serviceable, in these cases, Eshopbox will send cancellation status to your app.
Request for cancellation from customer
When a customer requests a cancellation, you are required to create a cancellation request in Eshopbox. A customer can cancel the order before the shipment status is packed.
To cancel an order, send a POST request to the Order endpoint.
http://wms.eshopbox.com/api/cancel-order
You are required to register a webhook so that when the cancellation is processed Eshopbox can update your app.
Cancellation from Eshopbox
You are required to register a webhook so that when Eshopbox cancels an order it can update your app.
You are required to register a webhook to track the returns. Eshopbox will send updates whenever a return is created, picked up, pickup pending, pickup cancelled, out for pickup, in transit.
Event Subtypes corresponding to which Eshopbox will send updates.