Mediation: Send Events
This reference explains the Mediation: Send Events task.
Use the Mediation: Send Events task to send event data from a workflow to a Mediation meter. The task supports the following delivery methods:
-
API – Calls the Mediation ingest usage events API.
-
S3 – Writes event files to a Zuora-managed S3 path that Mediation reads from.
You can select a Mediation meter and either send a JSON payload through the ingest API (API method) or send a file produced by a previous workflow step (S3 method).
API delivery method
When Delivery Method is set to API, the task:
-
Uses the selected meter as the
GlobalMeterIdpath parameter in the Mediation ingest usage events API. -
Sends the JSON body you configure in the task as the request body. The JSON body format is the same as the one used in the Workflow Callout task for the same ingest endpoint.
-
Calls the Mediation APIs internally using configured Zuora credentials. No Mediation-specific credentials are configured on this task.
Ensure that the JSON body is formatted and populated correctly according to the Mediation ingest usage events API.
S3 delivery method
When Delivery Method is set to S3, the task:
-
Uses the S3 connection and bucket for the customer or tenant that Mediation is integrated with. The task does not accept or store S3 credentials.
-
Writes event files to an S3 folder structure under a prefix such as
mediation-workflow-source/<Tenant ID>/<Meter ID>. -
Uses the default prefix
mediation-workflow-source. The prefix is hidden in the normal task configuration UI and is configurable only by internal Zuora Workflow administrators. -
Takes a file from a previous workflow step as the input for the events to send.
Mediation reads and processes the files from this S3 location. The task does not control how Mediation processes or deletes the files after they are written.
Task settings
-
Delivery Method (required) - Select how Workflow sends events to Mediation:
-
API – Sends events using the Mediation ingest usage events API.
-
S3 – Writes event files to the S3 bucket and path used by Mediation for this customer or tenant.
-
-
Meter ID (required) - Select the Mediation meter that receives the events.
The field displays a dropdown of Mediation meters with the meter name and ID in each row. For example,
Usage Royalty Event (ID: 3).You can also enter a meter ID using free text.
Only the meter ID is used and stored. Meter versions are not configured on this task.
-
JSON body (required for API delivery method) - The request body sent to the Mediation ingest usage events API. This field is applicable only when Delivery Method is set to API.
-
The structure of this JSON body is the same as the body used by the Workflow Callout task when calling the same ingest endpoint.
-
Ensure that the JSON body is formatted and populated correctly according to the Mediation ingest usage events API.
-
Input File (required for S3 delivery method) - Select the file from a previous workflow step that the task writes to the Mediation S3 location.
You select a file from the workflow's existing Files output.
CSV is the preferred file format. The task allows other file types so that Mediation can support additional formats in the future.
This field is applicable only when Delivery Method is set to S3.
Routing Key (optional) - Enter a routing key for the S3-delivered event file.