Qeasy Cloud
Get Started

Sales Outbound Order API Field Handbook: Aggregated Practice from Wangdiantong to Chanjet T+

· 系统管理员· Engineering Best Practices· 14 views· 4 min read
WDT畅捷通T+销售订单接口字段手册Data Integration踩坑复盘

What Problem Does This API Solve

In retail and e-commerce operations, the sales outbound order in the ERP system is the core voucher connecting orders, inventory, and finance. A common pain point we have encountered across customer projects is that outbound orders generated in Wangdiantong need to be synchronized to Chanjet T+ in near real-time to create sales delivery vouchers, which then drive invoicing and reconciliation. The QueryStrategyData API is specifically designed to pull outbound data incrementally by strategy and time window, and combined with scheduled tasks it achieves near real-time data aggregation.

API Capability Overview

  • Authentication: Internal strategy token within the Qeasy (轻易云) Data Integration Platform; no need to expose source system credentials.
  • Request Method: RESTful POST, method name QueryStrategyData.
  • Core Request Parameters: strategy_id (plan ID, distinguishing different account sets), status (data status filter, e.g. 0,6 means waiting and queued), created_at_begin/end (incremental time window), page, pageSize, projection (project fields on demand).
  • Response Structure: JSON array, each record is an aggregated outbound order containing primary keys, detail list, and status code.
  • Pagination and Incremental: Supports page+pageSize pagination; recommended to combine created_at timestamp as incremental cursor; scheduled task */10 * * * * runs every 10 minutes.
  • Multi-Account Set Isolation: Different strategy_id values distinguish 002 account set, 001 account set and other independent data sources.

Typical Field Mapping

Field NameTypeMeaningPractical Notes
stockout_nostringOutbound order numberBusiness primary key; preserve prefix when mapping to Chanjet T+ ExternalCode
stockout_idstringOutbound order internal IDSystem unique identifier, used as idempotent dedup key
trade_nostringTransaction/order numberMain business code in ERP, preferred for cross-system reference
src_trade_nostringMall order numberIn multi-platform scenarios must combine with shop_no to identify ownership
warehouse_nostringWarehouse codeKey field for warehouse mapping; translation needed if target uses code
shop_nostringShop codeFrom Wangdiantong to Chanjet usually maps to customer code
consign_timestringDelivery timeMust be converted to consign_time_new standard format before writing to Chanjet
receivablestringReceivable amountAll amount fields are string; convert via BigDecimal to avoid precision loss
goods_total_amountstringTotal goods selling priceSame as above, handle together with currency field
statusstringOutbound order statusUsed in queries to filter pending data
details_liststringOutbound order detailsJSON structure, must be parsed line by line before mapping to delivery details
cs_remarkstringCustomer service remarkDirectly mapped to Chanjet Memo field
receiver_province/city/districtstringReceiver province/city/districtKeep region codes for downstream validation

How to Configure on Qeasy (轻易云)

On the Qeasy Data Integration Platform, this API call typically adopts a "strategy data source + write target" bidirectional configuration pattern. The platform aggregates Wangdiantong raw data by account set into a strategy table. Configuration steps:

  1. Create a "Wangdiantong Sales Outbound" strategy in data source management, bind the corresponding account set strategy_id.
  2. In Qeasy's field mapper, drag source fields on the left to target fields on the right such as VoucherDate, ExternalCode, Customer, Memo of Chanjet T+ sales delivery.
  3. For details_list, Qeasy automatically expands it into a sub-table and maps to SaleDeliveryDetails.
  4. Configure scheduled task */10 * * * *; the platform automatically manages incremental cursors and retries.

Cross-Scenario Practice Essentials

Across multiple customer projects, we have distilled these common experiences:

  1. Multi-account sets require independent strategies: 002 and 001 account sets must have different strategy_id to prevent data cross-contamination and downstream reconciliation errors.
  2. status filtering beats full pull: Using status=0,6 to only pull waiting and queued data reduces invalid traffic by over 70%.
  3. Amount fields must be handled as strings: Source returns string type; must convert to BigDecimal in the middleware before writing to target.
  4. Detail expansion is the key bottleneck: details_list is a JSON string; the platform side must configure a JSON parser to expand line by line, otherwise details may be lost or duplicated.
  5. Delivery time is the gold field for voucher date: consign_time is converted and used as Chanjet VoucherDate; format must be confirmed with finance in advance.
  6. Idempotency relies on dual keys: Use stockout_id + stockout_no combination as idempotency key to prevent duplicate writes from network retries.

Troubleshooting Recap

  1. Account set data crossover: A customer once misconfigured 002 account set's strategy_id as 001's, resulting in dirty data in the 001 account set. The safe approach is to create separate strategy files per account set with strict naming differentiation.

  2. Amount precision loss: Source returns string 1234.5600, target writes directly to float field becoming 1234.56, causing a one-cent difference during reconciliation. This is easy to fail; must explicitly declare decimal type in the mapper.

  3. Detail row parsing timeout: When a single order has over 500 detail lines, the platform's default parser times out. The safe approach is to pre-split large orders or enable streaming parsing in the mapper.

  4. Missing region codes: Some legacy data lacks receiver_province_code, causing downstream address validation failures. Recommend filling default values and tagging before writing.

  5. Incremental cursor rollback: Server clock rollback causes created_at incremental to miss data. This is easy to fail; recommend combining modified field as dual cursor fallback.

When to Choose

This API is suitable for near real-time synchronization of sales outbound orders between Wangdiantong ERP and Chanjet T+, especially for retail enterprises with multiple shops, warehouses, and account sets. It is not suitable for full-volume report pulling without detail expansion needs, nor for cross-year historical data batch migration — the latter is better handled via offline ETL channels.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/engineering/hb-p2-232-002-001-copy-e59e

Comments