"Get Metrics" node
The Get Metrics node lets you retrieve results of up to 50 metrics created in the Analytics module and incorporate them into workflows to distribute metrics results to external services where the metrics data is crucial for business operations. You can use this node only in business workflows.
The Get Metric node exports a file to the workflow which contains 3 columns:
id
(the ID of the metric),name
(the title of the metric),results
(the result of the metric)
In the configuration of the workflow, you can define the period from which you want to get the results. If the selected date ranges in the workflow and metrics settings do not overlap, the workflow’s time range settings will take precedence over the original metric settings. For instance, if a metric is set to the last 7 days but the Get Metrics node in the workflow requests results from the last 30 days, the 30-day range will be used.
In a workflow, when the Get Metrics node is reached, the workflow will only progress after the requested metric results are calculated. Any records not generated due to an error will be accessible in the Transformation Logs tab.
Prerequisites
- Create a metric.
- You must be granted a user role that includes the
Data export > Export metrics result
permission.
Node configuration
-
To create a workflow that lets you export the results of metrics, go to Automation > Workflows > New workflow.
-
Select one of the business trigger nodes, for example Scheduled Run.
-
Click THEN > Synerise > Get Metrics.
-
Open the configuration form of the node by clicking it.
-
Optionally, in the Time range field, on the calendar, select the time range from which you want to get the results of the metric or metrics. The time range you select will override the original time range settings of the metrics.
-
In the Select metrics field, select one or more metrics whose results you want to extract.
-
Confirm the settings by clicking Apply.
Example of use
You can launch a workflow that exports the number of event occurrences from the day before the current day.
In the example, metrics for the following events are used (you must create the metrics yourself):
The workflow will be launched every day at 2:00 A.M.
-
Start the workflow with the Scheduled Run node. In the configuration of the node:
- Set the Run trigger to all time.
- Select the timezone in which the workflow will be launched.
- Select the Everyday tab.
- In the field with time, set the value to
02:00
. - Confirm by clicking Apply.
-
Add the Get Metrics node. In the configuration of the node, select the three metrics and set the time range to the day before the current day.
-
Add the Azure Blob Storage > Send File. In the configuration of the node:
- Select the connection.
- If no connections are available or you want to create a new one, see Create a connection.
- If you selected an existing connection, proceed to defining the integration settings.
-
Add the End node.
Result: