Skip to main content

Create a new meter using custom method

Zuora

Create a new meter using custom method

To create a new meter based on a custom method, perform the following steps:

  1. Click Create Meter on the Meters home page.
  2. Enter a name for the meter and select Custom.
  3. Click Create, the Meter Stream window opens.
  4. The left panel displays a component library from which you can add the desired component to build the meter.
  5. Also you can add a component by clicking  icon on the meter stream page.
  6. Design the flow of the meter, including adding, deleting, or cloning components, and connecting loose components. For more information, see Edit a custom meter.
  7. Configure the component parameters. For more information, see Meter components configuration.

Available meters components

Mediation components are building blocks of meters. A component receives data from the preceding component, performs actions predefined by the meter creator, and optionally triggers the following component. To configure and edit a meter component, see Meter components configuration.

Component Types

  • Sources - A source component can pull, upload, or ingest data to the meters. You can pull data from a data warehouse, upload data from files, or ingest data from streaming API.
  • Processors - A processor component can process data, such as map, enrichment, aggregation, advanced data transformation, individual rating, and so on, to support customers' requirements. Both standard and advanced customer-specific scripts are supported.
  • Targets - A target component can export data into a data warehouse or load events such as Usage Records to Zuora Billing, that is, to Snowflake, AWS S3, or load the resulting usage records into Zuora Billing. 

The following meter components are available.

Component Type Components Description
Source Streaming API Streaming API source is used for long-running requests left open so data can be pushed into it. These APIs are used to read data from the web in real-time and provide users with precise and up-to-date information. Streaming API or Kafka Source can handle up to 10K records per second.
Amazon S3 Amazon S3 source is used to set up the S3 connection, including the S3 bucket, credentials, and base path to ingest data into Meter. To set up a connection and provisioning, contact Zuora Support. The throughput can also reach a max of 10K records per second.
Upload File Upload File source is used to upload data files into Meter. The Supported formats are CSV, JSON, XML, PARQUET, and AVRO. The maximum size of an uploaded file is 10MB, and the maximum number of lines of an uploaded file is 10K.
Snowflake Snowflake source is used to set up Snowflake connection, including the connection path, table, or query to ingest data into Meter. To set up a connection and provisioning, contact Zuora Support. The throughput can also reach a max of 10K records per second.
Kafka Kafka source is used to set up Kafka connection, including the connection path, topic, and data format to ingest data into Meter. To set up a connection and provisioning, contact Zuora Support. The throughput can also reach a max of 10K records per second.
Processor Enrichment Enrichment is used to provide additional data information to the original events. If the raw events do not come with all the data fields required for rating and billing, this processor adds additional data, such as Zuora Subscription Number, Charge Number, UOM, and so on as additional data fields, based on lookup the raw event attributes from Zuora system.
Map Map operator allows the transformation of the column name or its value to another field name and value. This component allows renaming, dropping, and transforming the event fields and field data.
Aggregator

Aggregator is the operator where you can group values by different fields, that is, time, ID and so on.

The aggregate fields can be operated by sum, count, max, min, and so on based on the group criteria.

Accumulator Accumulator is used to mount the value up with a certain period of time. “Accumulates” or collects events into a set that are to be processed together rather than in a streaming fashion. The aggregate fields can be operated by sum, count, max, min, and on based on group criteria.
Filter Filter operator allows to exclude certain events from further processing based on the preset conditions.
Deduplicator Deduplication is a technique for eliminating duplicate copies of repetitive events. This component guarantees the processing of unique events.
Advanced Transformer Advanced Transformer is where you can put a self-written script into the pipeline to transform your data. Use the Advanced Transformer to add actual code to perform the transformation you need. We support JavaScript and Python.
Target Usage Records Usage Records target is used to take the result events and loads them as Usage Records into Zuora Billing.
Snowflake Snowflake target is used to set up the connection, including the connection path, table, or query to export the output data in your Snowflake. To set up a connection and provisioning, contact Zuora Support.
Amazon S3 Amazon S3 target is used to set up the S3 connection, including the S3 bucket, credentials, and base path here to export the output data in your Amazon S3. To set up a connection and provisioning, contact Zuora Support.
Kafka Kafka target is used to set up the Kafka connection, including the connection path, topic, and data format, to export the output events to your Kafka. To set up a connection and provisioning, contact Zuora Support.

Edit a custom meter

You can edit a meter. You can still view the component details of a meter by clicking the meter. Meter opens in the Meter Stream window.

You can perform these actions to a custom meter:

  • Select to start adding a component.
  • Hover over a component, click the More icon and then click Edit to configure the parameters for the component.
  • A new window will open for you to configure the settings for the component. The available settings are different from one type of component to another. To configure and edit a meter component, see Meter components configuration.
  • Hover over a component, click the More icon and then click Delete to delete the component. When a component is deleted, the connecting arrows before and after the component are also deleted, thus creating loose components. 
  • Connect loose components by dragging the finishing point of a component and dropping to the starting point of another component.
  • You can change the type of the source and target components only.