Skip to main content
Version: Unreleased

How to create a report

This page describes, how to create an Auto Trigger job from an existing query in the Calls view and run it. Use this guide when you want to set up automated reports or scheduled exports based on Elasticsearch queries.

Goal

Create and save an Auto Trigger entry whose configuration contains the desired query. The entry should have the correct output configuration (for example, transport includes email and transformation type is toCsv) and be runnable from the UI.

Step-by-step guide

  1. Open the application root in your browser.

  2. Navigate to the Calls section via the left navigation.

  3. Change the time range/filtering as needed to ensure the desired call event(s) are visible.

  4. Locate the query you want to use. Open the call row's Action dropdown and select the Copy ES query item (it's always in the Action dropdown). The query will appear in a modal or textarea where it can be copied.

  5. Go to the Auto Trigger section via the left navigation.

  6. Click Create New to start a new Auto Trigger entry. And navigate to the newly created entry's editor.

  7. In the editor, find the following fields and update them (use the CTRL+Space shortcut to get autocomplete suggestions):

    • dataSource → set to es
      • parameters → paste the query copied in step 4, the parts that were copied should be replaced into the [] section of the parameters object. --> for example:

        {
        "dataSource": "es",
        "variableName": "ESVariable1",
        "parameters": [
        {},
        {
        "sort": [
        {
        "@timestamp": {
        "order": "desc"
        }
        },
        {
        "attrs.type": {
        "order": "asc"
        }
        }
        ],
        "query": {
        "bool": {
        "must": [
        {
        "query_string": {
        "query": "attrs.type:call-end OR attrs.type:call-start OR attrs.type:call-attempt"
        }
        },
        {
        "range": {
        "@timestamp": {
        "gte": "now-1d/d",
        "lte": "now"
        }
        }
        }
        ]
        }
        }
        }
        ]
        }
        • for the the formatChannel there could be multiple options, for example:

          • toCsv → if you want the output file to be in CSV format.
          • toJson → if you want the output file to be in JSON format
        • you can set multiple transformations, for example:

         "formatChannel": [
        {
        "transformationType": "toJson",
        "parameters": {}
        },
        {
        "transformationType": "toCsv",
        "parameters": {}
        },
        ]
        • transport → set to the desired transport method, for example:
          • email → if you want to receive the report via email.
          • webhook → if you want to send the report to a webhook URL.
        • you can set multiple transports, for example:
         "transport": ["emailChannelId", "webhookChannelId"]
  8. Click Save and confirm the UI shows a success message and the entry appears in the list of entries.

  9. Optionally, click Run Now (or similarly labeled button) for the entry and confirm the UI displays a started/completed status or shows the run in execution history.

After running the report

After the report has run, you can check the execution history for details about the run, including any generated files or outputs. Depending on your transport configuration, you may also receive the report via email or other methods specified in the transport settings.