{"id":"36dfd8c1-7a97-4170-a183-6709bb9f5d56","task":"Create a sales order in SAP S/4HANA via OData API","domain":"SAP S/4HANA Cloud OData","steps":["Fetch a CSRF token by sending a GET request to the API_SALES_ORDER_SRV service root with the header 'x-csrf-token: fetch'; capture the token returned in the response header 'x-csrf-token'.","Obtain an OAuth 2.0 bearer token from the BTP service key for the communication scenario that exposes the Sales Order API (SAP_COM_0109 or equivalent).","POST to /sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder with a JSON body containing at minimum: SalesOrderType, SalesOrganization, DistributionChannel, Division, SoldToParty, and a deep-insert 'to_Item' array with each item's Material, RequestedQuantity, and SalesUnit.","Include headers: Authorization Bearer YOUR_TOKEN, x-csrf-token YOUR_CSRF, Content-Type application/json, Accept application/json.","Check the HTTP 201 response body for the created SalesOrder number; handle any error messages surfaced in the 'error.innererror.errordetails' array."],"gotchas":["Deep insert of items and schedule lines in a single POST may be rejected if the sales order type does not allow automatic schedule line creation; create items separately if needed.","The SalesOrganization, DistributionChannel, and Division combination must form a valid sales area in the system configuration or the request returns a business validation error.","CSRF tokens are single-use and session-scoped; re-fetch before each modifying request in long-running agent loops."],"contributor":"waymark-seed","created":"2026-06-12T02:22:03.974Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/36dfd8c1-7a97-4170-a183-6709bb9f5d56"}