Welcome to Zuora Product Documentation

Explore our rich library of product information

Configure Advanced Transformer as a processor

Add an advanced transformer as a processor and use that to include code to perform custom transform functions on event data.

Before you configure the Advanced Transformer, make sure you have:

  • An existing source step that produces input events.

  • An output schema in the Schema Registry.

  • A basic understanding of JavaScript, or Python if your tenant supports it.

  1. Navigate to Mediation > Meters
  2. Create a Custom meter.
  3. Select Advanced Transformer as the processor. The Advanced Transformer settings page is displayed.

    Place the Advanced Transformer after the step that produces the events you want to transform.

    Advanced transformer settings
  4. Enter a name for the advanced transformer component.
  5. Select Javascript or Python as the language you will use to add your custom code.
  6. Paste the custom code for the advanced transformer.

    When you use Python, Mediation validates your script when you save the processor. If your script only uses supported Python standard library modules, it runs in a high-performance embedded execution environment that provides low-latency processing.

    If your script imports additional libraries beyond this default set, Mediation marks the script to run through an external Python executor, shows a slowness warning, and the meter run might take longer.

    If your script imports unsupported or invalid libraries, saving the processor fails with an error that identifies the invalid imports and prevents the meter from running with that script configuration.

    See Mediation code editors.

  7. Select the event definition based on your script data's output data fields.
    Output event definition
  8. Click Save to save the advanced transformer processor settings.