Postman collection
General Write

pixiImportProcessXML

Processes an imported item or order XML from C_XMLLog immediately (parse, check and apply to main tables) instead of waiting for the SQL Agent import job.

Triggers the processing of one imported XML, identified by XMLLogKey, right away.

  1. Validation: the XML must exist in C_XMLLog, its operation type (C_OperationTypes.OperationType) must be ItemImport or OrderImport, and its Status must be one of COC, ERR, NEI, XER, XIM or XPA. Otherwise a status row with ReturnCode = ERROR API is returned.
  2. Item XML (ItemImport):
    • If the application lock PixiItemImport is currently held (the item import agent job is running), only the parse step Pixi_C_ParseAndCheckXMLsFromItemImport is executed for this XML, and the call ends with an ERROR API row saying the XML is already in process and has been parsed.
    • Otherwise the call takes the lock itself, runs the parse/check step and then Pixi_C_ApplyItemsToMainTables for this XML, and releases the lock.
  3. Order XML (OrderImport): same logic with lock PixiOrderImport, the parse step Pixi_C_ParseAndCheckXMLsFromOrderImport and the apply step Pixi_C_ApplyOrdersToMainTables.
  4. At the end a status row with ReturnCode = OK is returned.

All called procedures run with the user name API.

Because the called procedures return their own rows, the caller receives several result sets: the Success row of the parse step, possibly rows of the apply step, and finally the ReturnCode/ErrorMessage status row. Always evaluate the last result set for the outcome.

Notes

  • Errors in parse/apply are swallowed: the parse and apply steps run in an inner TRY/CATCH that only releases the application lock. If one of them fails, the call still returns ReturnCode = OK. Check C_XMLLog.Status/Error afterwards to verify the real result.
  • The informational message XML with XMLLogKey {XMLLogKey} has been processed. is raised with severity 1 and may appear as SqlMessage; it is not an error.
  • In the "already in process" case the XML has been parsed although ReturnCode is ERROR API.
  • The application locks PixiItemImport / PixiOrderImport (session owner) are shared with the SQL Agent import jobs; while the call holds the lock, the agent job cannot process at the same time.
  • The called procedures respect the settings C_ItemImportEnabled, C_ItemImport_ParseAndCheckData_Enabled, C_OrderImportEnabled, C_OrderImport_ParseAndCheckData_Enabled, C_OrderImport_ApplyToMainTables_Enabled and per-channel-type settings. If they are disabled, the steps do nothing, but the call still returns OK.
  • The parse steps only parse XMLs of channel type URL whose Error column is empty. XMLs of channel types PlentyREST or ShipRush are only reset to status XIM (with AttemptsToProcess = 0) so that the Integration Service parses them again.
  • The parse steps also do global work (e.g. pixi_C_UpdateXMLsAsParsed, exchange rate import for orders), and the order apply step calls Pixi_AmazonOrdersMarkOrders.
  • The setting C_ParseAndImportDataIntervalMinutes is read but not used.
  • Pixi_C_ApplyItemsToMainTables is not attached; its exact behaviour and returned rows are unknown.
  • Existence and status checks use NOLOCK.

Tables used

C_XMLLog · Write C_OperationTypes · Read Settings · Read C_Channels · Read C_ChannelTypes · Read C_Int_Items · Write TontrArten · Read C_Int_OrderHeader · Read C_Int_Orderlines · Read C_ConstraintCheckErrors · Read
SQL object:
dbo.pipiImportProcessXML
Updated at 2026-10-30