“The export job must include all interaction metadata for chain of custody compliance.”
Running bulk export for agent script interactions via /api/v2/interaction/recordings/export. Job fails with 500 Internal Server Error after 2 minutes. Payload includes legal_hold: true.
Standard recordings export fine. Issue isolated to script channel data in EU-West. Audit trail shows no scope violations. Is the script metadata schema incompatible with the current bulk export version? Logs show null reference on script_version_id.
The 500 error usually stems from the payload size exceeding the internal buffer for script metadata when legal_hold is enabled. The Script Export API handles large JSON blobs differently than standard audio exports. Try breaking the export into smaller date ranges, such as 24-hour chunks, to reduce the metadata payload per request. Here is a sample JMeter configuration that implements this chunking strategy:
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Chunked Script Export" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="startDate" elementType="HTTPArgument">
<stringProp name="Argument.name">startDate</stringProp>
<stringProp name="Argument.value">2023-10-01T00:00:00Z</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
</elementProp>
<elementProp name="endDate" elementType="HTTPArgument">
<stringProp name="Argument.name">endDate</stringProp>
<stringProp name="Argument.value">2023-10-01T23:59:59Z</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
</elementProp>
<elementProp name="legal_hold" elementType="HTTPArgument">
<stringProp name="Argument.name">legal_hold</stringProp>
<stringProp name="Argument.value">true</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
</elementProp>
</collectionProp>
</elementProp>
</HTTPSamplerProxy>
Run this with a thread count of 10 to avoid triggering rate limits. The issue is likely the combined size of script interactions plus legal metadata. Smaller batches prevent the backend service from timing out while processing the compliance data. Also check if the script version is deprecated, as older versions sometimes lack the required fields for legal hold exports. This approach worked for similar bulk export failures in our load tests. Focus on reducing the payload size first.