Every field on the Integrations tab, when an order is sent to ERPNext, and where to see the result.
Where to find itShopSettingsIntegrations
Before you start
Needs the "ERP & accounting (ERPNext, Zoho)" plan feature and an ERPNext site you can create API keys on.
Plan
Growth
Needs
Included with the plan
Who can use this
Shop owner
With ERPNext switched on, the shop creates a Sales Order in your ERPNext site for each order, and the customer if ERPNext does not have them. Data flows one way. Stock and prices are not synced.
ERPNext Configurations
The fields appear after you turn on Enabled.
Field
What to enter
1. Enabled
Turns the integration on
URL
The address of your ERPNext site. The shop calls /api/resource/… on it
Token
An ERPNext API token, sent as Authorization: token …. The box never shows the saved value
Company
The ERPNext company on the Sales Order
Warehouse
The warehouse set on the Sales Order
Tax Account Head
The account head of the tax row
Tax Charge Type
The charge type of the tax row
Delivery Charge Account Head
The account head of the delivery-charge row
Days
"Default number of days for delivery date calculation". Used when the order has no delivery date
Select Save Settings when done.
When an order is sent
Enable Integration Override
An order is sent when
Off
It is picked up or delivered, whichever happens first
On
A delivery person accepts it
An order that already has a Sales Order is not sent again.
Each trigger makes one attempt. A failure is stored on the order. With the override off, a failure at pickup is tried again at delivery.
Demo-store orders are never sent.
Only order lines whose product has a barcode are sent. The barcode is the ERPNext item_code.
With the override on, an order that no delivery person accepts is never sent.
What the Sales Order contains
Standard mode: status Draft, the customer (found by mobile number, or created), transaction and delivery dates, company, currency, warehouse and item lines. It has a tax row, a delivery-charge row and the discount. A shop with several locations also sends the location's ERPNext branch when one is set.
Enable Integration Override
Turn this on only if your ERPNext site has the custom fields this mode writes, such as custom_shop and custom_b2c. It changes the trigger and sends these values:
Field
Sent to ERPNext as
Customer Group
customer_group of a new customer
Custom B2C
custom_b2c of a new customer
Territory
territory of a new customer
Order Type
order_type of the Sales Order
Branch
branch, unless the order's location has its own ERPNext branch
Selling Price List
selling_price_list
Taxes and Charges
taxes_and_charges
In this mode the customer is looked up by phone number without the country code, and item rates are sent without tax. The customer and a billing address can be created in ERPNext as soon as the order is placed.
See the result
The order page shows ERPNext order with the Sales Order number, linked to your ERPNext site. The orders list shows it as a badge.
After a failure, the order page shows ERPNext Error: with a View link to the message returned.