Metric: Count

The Metric: Count Action is one of the ways to gather data on how apps are being used. When the Action is riggered, it increases a named counter that can then be seen in a reporting dashboard. This can be used to track statistics such as how many times customers are escalating cases to an agent.

16761676

Use Cases

  • To count the total number of products ordered by customers over time. This could be accomplished by running the Count Action with the Field value set to the number of items in the customer's cart when they check out.
  • To count the number of times each endpoint in an API is used. This could be accomplished by running the Count Action in the API's Journey with a Metric Key named after the endpoint, and a Field value of 1.

Properties

Metric Key

Expects type text.

The key that identifies this counter. Each time the Action runs, it will add the value under Field to the counter named by this key.

Field

Expects type number.

The numeric value that will be added to the counter. This can be any number, or an Airscript expression that returns a number. Note that this field can be a number greater than 1, which will increase the counter faster.

Example

In this example, a metric will be created to keep track of the number of escalated cases.

756756

To see the report go to Console, select the app, and click on Manage App > View Report.