The connector only reads data. It never creates, changes or deletes anything in Mabang.
Configuring Mabang ERP as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Mabang ERP option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
The connector signs in with your company’s AppKey and App secret from the Mabang Open Platform. Someone with the company’s main Mabang account gets them:1
Open the Mabang Open Platform
Go to gwapi.mabangerp.com/web, log in with the company’s main Mabang account and open the Control Center (控制中台).
2
Check the enabled APIs
Under Purchased APIs (已购买API), check that the APIs listed for each table in Fields by stream are there. Mabang sells access to its API; an API that is not enabled, or whose subscription expired, is refused. If one is missing, the tables that need it are skipped and the others keep syncing.
3
Copy the AppKey and App secret
Under Developer (开发者), copy the AppKey and the App secret (Mabang asks for your login password again to show the secret).
4
Check the IP whitelist
The Developer page also has an optional IP whitelist. If it is filled, add Nekt’s addresses
34.24.209.97, 34.74.81.117 and 34.138.230.39; if it is empty, nothing needs to be done.- AppKey: The AppKey of your company in the Mabang Open Platform.
- App Secret: The App secret shown next to the AppKey.
- Start Date: Earliest date read on the first sync and on full syncs: orders by update date (or payment date, for orders older than four months) and return orders by update date. The other tables are always read in full.
- Archive Re-read Days (advanced, default 14): Mabang moves orders older than four months to an archive. Every sync reads this many payment days of the archive again and updates the archived orders that changed since the previous sync (a late refund, for example). Older archived orders are only refreshed by a full sync. 0 turns it off.
2. Select streams
Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.Tip: The stream can be found more easily by typing its name.Select the streams and click Next.
3. Configure data streams
Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.- Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
- Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
- Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
- Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
- Incremental: every time the extraction happens, we’ll get only the new data, which is good if, for example, you want to keep every record ever fetched.
- Full table: every time the extraction happens, we’ll get the current state of the data, which is good if, for example, you don’t want to have deleted data in your catalog.
4. Configure data source
Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times). Optionally, you can define some additional settings:- Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource here.
- Determine when to execute an Additional Full Sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while. For Mabang we recommend a monthly full sync (between 08:00 and 20:00 Brasília time): it refreshes archived orders that changed more than Archive Re-read Days after being archived.
5. Check your new source
You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.Mabang allows 300 requests per minute per API, shared with any other tool that uses the same AppKey. Orders are read one day at a time (two requests per day, plus one per 1,000 orders), and Mabang keeps only the last four months in its order list: older orders come from its order archive, read one payment day at a time. A first sync with a start date one year back makes about 1,500 requests, roughly seven minutes. All dates and times are converted from China time to UTC.
The archive keeps fewer details than the recent order list (for example, payment type, custom order number and close date are not in it), so those columns are empty for orders read from the archive (
source_api = get-history-order-list). Two kinds of orders can be missing after a full sync: orders older than four months that Mabang has not moved to the archive yet and that did not change in the last four months, and archived orders without a payment date (the archive is read by payment day).Fields by stream
Nested data (addresses, item lines, fees, per-warehouse settings) arrives as JSON text in one column. Every table also has an
extra_fields column with any field Mabang sends that has no column of its own. Amounts ending in _cny are in Chinese yuan; the others are in the order currency (currency).Orders and returns
Orders
Orders
Sales orders from every marketplace shop connected to Mabang, with buyer, address, amounts (in the order currency and in CNY), fees, logistics and status. The current item lines of each order are also in
order_items (JSON).Table: orders · Primary key: erp_order_id · Sync: Incremental (update_time) · Mabang API to enable: Order API: order-get-order-list-new; for orders older than four months also get-history-order-list (without it, only the last four months are synced, and a full sync keeps only those four months)Order items
Order items
One row per item line of each order, read together with the order (no extra request). A line removed from an order stays in this table with the order’s previous update time: keep only the rows whose
order_update_time equals the order’s update_time.Table: order_items · Primary key: erp_order_id, order_item_id · Sync: Incremental (order_update_time) · Mabang API to enable: Same as OrdersReturn orders
Return orders
Return orders (RMA) with their status, receipt, carrier and claim details. The returned items are in
items (JSON).Table: return_orders · Primary key: refunds_order_id · Sync: Incremental (update_time) · Mabang API to enable: Order API: order-get-return-order-list-v2Products and stock
Products
Products
Every stock SKU of the company, with names, brand and category, prices and costs, dimensions, customs data, people in charge and per-warehouse settings (JSON).Table:
products · Primary key: id · Sync: Full table · Mabang API to enable: Commodity API: stock-do-search-sku-list-newInventory
Inventory
Current stock of every stock SKU in every warehouse: total, available, reserved and in-transit quantities. Each sync writes a new snapshot;
snapshot_at tells when it was read.Table: inventory · Primary key: stock_sku, warehouse_id · Sync: Full table · Mabang API to enable: Commodity API: stock-do-search-sku-list-new and stock-get-stock-quantityReference data
Warehouses
Warehouses
Every warehouse of the company (own, third-party, FBA and platform), enabled and disabled.Table:
warehouses · Primary key: id · Sync: Full table · Mabang API to enable: System API: sys-get-warehouse-listShops
Shops
Every marketplace shop connected to Mabang, enabled and disabled.Table:
shops · Primary key: id · Sync: Full table · Mabang API to enable: System API: sys-get-shop-listLogistics channels
Logistics channels
Logistics channels (carrier services) configured in Mabang, enabled and disabled.Table:
logistics_channels · Primary key: logistics_channel_id · Sync: Full table · Mabang API to enable: Logistics API: wl-get-mylogisticschannel