diff --git a/src/cdk/v2/destinations/gladly/rtWorkflow.yaml b/src/cdk/v2/destinations/gladly/rtWorkflow.yaml index bf08fd451f..4230789632 100644 --- a/src/cdk/v2/destinations/gladly/rtWorkflow.yaml +++ b/src/cdk/v2/destinations/gladly/rtWorkflow.yaml @@ -16,12 +16,13 @@ steps: - name: successfulEvents template: | + const status = $.getStatusCode($.requestMetadata, $.outputs.transform#idx.output.status) $.outputs.transform#idx.output.({ - "batchedRequest": $.getPayload(.), + "batchedRequest": .{~["status"]}, "batched": false, "destination": ^[idx].destination, "metadata": ^[idx].metadata[], - "statusCode": $.getStatusCode($.requestMetadata, $.outputs.transform#idx.output.status) + "statusCode": status })[] - name: failedEvents template: | diff --git a/src/cdk/v2/destinations/gladly/utils.js b/src/cdk/v2/destinations/gladly/utils.js index 7aaf2ee359..18ee9c976e 100644 --- a/src/cdk/v2/destinations/gladly/utils.js +++ b/src/cdk/v2/destinations/gladly/utils.js @@ -53,10 +53,4 @@ const getStatusCode = (requestMetadata, statusCode) => { return statusCode; } -const getPayload = (eventPayload) => { - const payload = eventPayload; - delete payload.status; - return payload; -} - -module.exports = { formatField, getCustomAttributes, getEndpoint, getHeaders, getStatusCode, getPayload }; +module.exports = { formatField, getCustomAttributes, getEndpoint, getHeaders, getStatusCode };