Actions9
Custom Sage X3 Action
AI-generatedSummary
Execute a custom Sage X3 action (XACTION) on a specified object via the XCHATX3OBJ sub-program.
Inputs
- actionCode (required) — The XACTION to send to the sub-program (e.g., LIST). Will be upper-cased.
- object (required) — Sage X3 object code (e.g., ITM, SOH, BPC).
- transaction — Sage X3 transaction code (XTRANSACTION). Leave empty for default.
- ident — Primary key (XIDENT). Fill only if the custom action requires an identifier.
- data (required) — JSON payload sent as XDATAJSON. Fields are dimensioned arrays (e.g., {"TSICOD":["20"]}). Use "TSICOD(1)":"20" for a specific index. Dates as "YYYY-MM-DD".
- x3Context.hiddenFields — Include hidden and technical fields in the response.
- x3Context.language — Override the XCHATX3OBJ language for this call (e.g., ITA).
- x3Context.responseFields — Restrict-api response to these field codes.
- x3Context.responseScreens — Restrict-api response to these screen codes.
- x3Context.user — Override target user (only honored when caller has GPROFIL=ADMIN).
- advanced.codeLang — Override credential codeLang for this call.
- advanced.compactArrays — Unwrap single‑element arrays in the data output (e.g., ["Value"] → "Value").
- advanced.includeRaw — Include the full SOAP response body in the output.
- advanced.includeRequest — Include the SOAP envelope and X3 input XML that were sent.
- advanced.includeResultXml — Include the parsed X3 result payload under the "result" key.
- advanced.poolAlias — Override credential poolAlias for this call.
- advanced.poolId — Override credential poolId. Set to previous call's sessionId to keep the same Sage X3 session.
- advanced.publicName — Override the Sage X3 sub‑program used (default: XCHATX3OBJ).
- advanced.requestTimeout — Abort the SOAP request after this many seconds if Sage X3 does not respond.
- advanced.trimEmpty — Drop empty values at the end of arrays (X3 pads dimensioned fields).
Output shape
object
Contains: success (bool), status (number), action (string), object (string), ident (string|undefined), transaction (string|undefined), data (any), messages (array of {message, type, typeCode}), trace (string|undefined), sessionId (string|undefined), technicalInfos (object|undefined), result (any|undefined) if includeResultXml, raw (string|undefined) if includeRaw, request (object with input and envelope|undefined) if includeRequest.