SAP 销售订单 JSON 生成
sap-order-json
从非结构化来源(电子邮件、PDF、订单表单或自由文本)生成 SAP 销售订单的 JSON。当用户要求创建、构建或映射 JSON 格式的 SAP 订单/销售订单负载时使用。
- License 许可
- MIT
- 最近更新
- 2026-11-02
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- sap-order-json
- description
- Generate an SAP sales order as JSON from an unstructured source (email, PDF, order form, or free text). Use when asked to create, build, or map an SAP order / sales order payload in JSON.
- argument-hint
- Paste the order source text and any known defaults (sales org, distribution channel, division, currency).
- user-invocable
- true
03 SKILL.md 正文
SAP Order JSON
Produce one SAP sales order JSON object from the supplied source.
Procedure
- Read
references/sap-sales-order.schema.json— it is the sole authority for field names, types, lengths, and meaning. Never invent a field that is not in the schema. - Extract values from the source, apply the mapping rules, validate, and emit.
- Output only the JSON object: no prose, no code fences, no comments.
Mapping rules
- Header org fields (
SalesOrganization,DistributionChannel,OrganizationDivision,SalesOrderType) come from user-supplied defaults; ask once if absent. DefaultSalesOrderTypetoOR. - Customer / material numbers: strip spaces, uppercase; if purely numeric, left-pad with zeros to the schema
maxLength. PurchaseOrderByCustomer= the customer's own PO / order / reference number from the source.ShipToParty=SoldToPartyunless a distinct delivery address or recipient is stated.- Dates: convert any format (incl. DD.MM.YYYY, "next Friday") to
YYYY-MM-DD.SalesOrderDatedefaults to today. - Items: one entry per ordered line, numbered
000010,000020, … in source order. - Quantities are decimal strings with 3 decimals; amounts with 2 decimals; no thousands separators,
.as decimal point. - Units and currency map to their code (
pieces|pcs|ea→PC,kilos→KG,€|euros→EUR). - Omit optional fields you cannot source. Never guess a value or emit a placeholder.
Validation rules
Before emitting, confirm:
- All
requiredfields present; at least one item. - Every
pattern/maxLength/formatin the schema satisfied; no additional properties. - Every
RequestedQuantity> 0. TotalNetAmountequals the sum of itemNetAmountvalues; if item amounts are unknown, omit both.RequestedDeliveryDate>=SalesOrderDate.TransactionCurrencyis a single currency for the whole order.
If a required field cannot be sourced, emit nothing and instead list the missing fields with the schema description of each.
04 同仓库更多 Skills
SAP 销售订单导出 Excel
sap-order-excel
将 SAP 销售订单 JSON 数据渲染到固定的 Excel 工作簿模板中。当需要将 SAP 订单导出、转换或写入 Excel 或 xlsx 时使用。
订单商品库存可用性校验
validate-order-product-availability
根据商品库存参考数据校验采购订单的履约能力。在商品身份解析之后使用,用于检查可用数量、聚合重复的 SKU、检测短缺,并报告受阻的库存检查。适用于单一仓库、即时履约,不涉及预留、延期交货或部分履约的情形。
订单折扣与促销评估
evaluate-order-discounts-promotions
使用提供的策略评估特定于商品、买方和供应商的采购订单促销。用于匹配供应商代码或名称、核验声称的折扣、资格、日期、货币、门槛、不可叠加规则,以及建议修订后的商品总额,而不更改已确认的订单。
订单商品身份校验
validate-order-product-identity
根据参考目录数据校验采购订单行的 SKU、条形码和商品描述。用于商品身份核查、未知商品、标识符冲突、描述不匹配,以及在库存或促销检查之前的可选条形码校验。
订单处理系统部署与检查
deploy-order-processing
部署 OrderProcessing 或检查现有安装。
BusinessProcessCore 部署验证
deploy-business-process-core
部署 BusinessProcessCore,或检查并验证现有安装,包括 OrderProcessing 所需的 Core 前置条件。