Knowledge Base - Experlogix Documents

Compressing Large JSON and XML Data

When generating documents with large amounts of data, such as extensive order lines, product catalogs, or complex data structures, JSON and XML payloads may exceed the 2 MB size limit.

Experlogix Documents supports compression to process larger data sets while preserving the original content. With compression, you can process up to 20 MB of uncompressed JSON or XML data, provided the compressed payload does not exceed 2 MB.

Compression is handled differently depending on whether you use the data set builder or the Experlogix Documents OData API.

Experlogix Documents automatically detects, decodes, and decompresses the payload before processing it. No additional configuration is required.

Uncompressed JSON and XML payloads continue to work as before, so existing integrations do not need to change.

To send compressed data as the input of a flow through the Smart Flows API, see Sending Compressed Data to Experlogix Documents Data Sets.

Using the Data Set Builder

When you create or edit a JSON or XML sample in the Samples tab, Experlogix Documents compresses large sample data automatically.

  • Import the data using Import JSON/XML data or enter it in the code editor.

  • Samples larger than 2 MB are compressed automatically before they are saved. No manual compression or Base64 encoding is required.

  • When you open a compressed sample, the code editor displays the original, uncompressed data.

  • If the sample exceeds a size limit even after compression, a Maximum data size reached message displays and the sample cannot be saved. Remove unnecessary data or large embedded media to reduce its size.

Sending Compressed Payloads Through the OData API

When using the Experlogix Documents OData API, you can send larger JSON and XML payloads by compressing and encoding the data before submitting the request.

To send a compressed payload:

  1. Compress your JSON or XML data using gzip.

  2. Encode the compressed data as a Base64 string.

  3. In the JSON request body, set the Source property to the Base64 string.

Payload Size Limits

The following limits apply to both the data set builder and the OData API:

Payload

Maximum size

Compressed payload

2 MB

Original uncompressed JSON or XML data

20 MB

For API requests, the 2 MB limit applies to the Base64-encoded string.

Both limits must be respected for the payload to be processed successfully.

Important Considerations

  • Compression format: Compress UTF-8 encoded data as a single gzip stream, then encode it using standard Base64. Base64url encoding, data: URI prefixes, and ZIP archives are not supported.

  • Request headers: For the OData API, send a regular JSON request (Content-Type: application/json) with the Base64 string in the Source property. Do not add a Content-Encoding header.

  • Data integrity: Compression is lossless, so the original JSON or XML content is preserved.

  • Compatibility: Compressed payloads require Experlogix Documents 26.10.2 or later.

  • Troubleshooting: If a compressed payload fails, verify that the original JSON or XML is valid, the compression and encoding are correct, and both size limits are respected.

Note: Existing uncompressed JSON and XML samples remain supported. Schemas and Form data set samples are not compressed.