> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/flow-components/metric.md).

# Metric

Show one number or date on a flow screen, with a label, an avatar, a secondary value and trend colors, typed in, mapped or aggregated by a query.

## Overview

The Avonni Metric shows one number or date on a Flow screen, with an optional label, description, avatar, prefix, suffix and secondary value. Use it to put a KPI in front of the user at the moment they act on it: this quarter's won revenue before a forecast is submitted, or the open cases left before a shift ends.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fkh1Ph2sdHcxVeJFGpxdc%2Fmetric-overview.png?alt=media" alt="Avonni Metric: label Won This Quarter, value US$482,500, description, and the secondary value Target US$500,000 under it" width="450"><figcaption><p>One number with its label, description and a secondary value.</p></figcaption></figure>

{% hint style="info" %}
**See it in a real project**

[Account Highlight Panel](https://docs.avonnicomponents.com/projects/use-cases/record-pages/account-highlight-panel): A custom highlights panel with metrics, badges and a gauge.
{% endhint %}

***

## Tutorials

Step-by-step guides that build on this page live in the [Metric tutorials](https://docs.avonnicomponents.com/flow/tutorials/components/metric.md).

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Show a KPI from a query</strong></td><td>Show this quarter's won revenue on a flow screen, summed live from Opportunities by the Metric's own query, with no Get Records or loop.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fzzwes95O26HGa3I75eX6%2Fmetric-cover-show-a-kpi-from-a-query.png?alt=media">metric-cover-show-a-kpi-from-a-query.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/metric/show-a-kpi-from-a-query.md">Show a KPI from a query</a></td></tr><tr><td><strong>Format money, percent and dates</strong></td><td>Format a Metric as money with the right currency, as a percent that reads as the user expects, or as a date, using Format Style and its options.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FIh2oMol5JDCudNcwqTwZ%2Fmetric-cover-format-money-percent-and-dates.png?alt=media">metric-cover-format-money-percent-and-dates.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/metric/format-money-percent-and-dates.md">Format money, percent and dates</a></td></tr><tr><td><strong>Add a trend against a target</strong></td><td>Color a Metric red or green against a quarterly target with Show Trend Color, and show the target or the gap next to it as a secondary value.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FEuwKOx1vcD0CNDwSKPqQ%2Fmetric-cover-add-a-trend-against-a-target.png?alt=media">metric-cover-add-a-trend-against-a-target.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/metric/add-a-trend-against-a-target.md">Add a trend against a target</a></td></tr><tr><td><strong>Branch the flow on a metric click</strong></td><td>Make a Metric clickable so a click on the number takes the user to a screen with the records behind it, using Flow Navigation and a Decision.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FjtsCBoh8XDeZYVywK5iU%2Fmetric-cover-branch-the-flow-on-a-metric-click.png?alt=media">metric-cover-branch-the-flow-on-a-metric-click.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/metric/branch-the-flow-on-a-metric-click.md">Branch the flow on a metric click</a></td></tr></tbody></table>

***

## Set up a Metric

From an empty screen to a working metric. Every setting named here has its full reference further down the page.

{% stepper %}
{% step %}

### Add the Metric to your screen

Open your screen in Flow Builder, search the components palette for **Avonni Metric**, and drag it onto the screen. Select it, then click **Open Component Builder**.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FUOescLCeYVVvpJ4ndmwN%2Fmetric-screen-editor.png?alt=media" alt="Flow Builder&#x27;s Edit Screen modal with the components palette filtered to Avonni Metric, and the component sitting on the screen canvas"><figcaption><p>The Metric comes from the components palette, the same place as every other Avonni screen component.</p></figcaption></figure>
{% endstep %}

{% step %}

### Start from a template

The Metric ships with five ready-made configurations: **Currency**, **Currency with Secondary Value**, **Custom Style**, **Custom Suffix**, and **Percent**. Open the [Templates](https://docs.avonnicomponents.com/flow/component-builder/component-templates.md) panel from the button in the Component Builder's top-left corner, pick the one closest to what you need, and adjust it. Skip this step to configure from scratch.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F8eJ8cbFmcmWaH8kWf6xz%2Fmetric-templates.png?alt=media" alt="The Templates panel of the Component Builder listing the five standard Metric templates, each with a live preview" width="320"><figcaption><p>Five starting points, each a working Metric you can edit. The <strong>Custom</strong> tab holds the templates you save yourself.</p></figcaption></figure>
{% endstep %}

{% step %}

### Choose how the value is formatted

Under **Primary Metric**, set **Format Style** first: it decides what the rest of the group offers. **Decimal**, **Percent**, **Percent Fixed** and **Currency** give you a number, and **Currency** adds **Currency Code** and **Currency Display As**. **Date** gives you a date instead, and swaps the number settings for the date ones.
{% endstep %}

{% step %}

### Give it a value

Set **Value**. Its mode menu offers **Manual** (a number you type), **Mapped** (a flow resource) and **Query** (an aggregate over records). Under **Format Style** **Date**, the same field takes a date.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FwGE4JGWWhy8QpwM9wStg%2Fmetric-properties.png?alt=media" alt="The Properties tab of the Metric property editor, showing the Primary Metric group with Format Style set to Currency" width="320"><figcaption><p>The <strong>Primary Metric</strong> group with <strong>Format Style</strong> set to <strong>Currency</strong>. <strong>Currency Code</strong> and <strong>Currency Display As</strong> are there because of that choice.</p></figcaption></figure>
{% endstep %}

{% step %}

### Label it

Set **Label** above the value and **Description** below it, so the number reads as something. Both are optional.
{% endstep %}

{% step %}

### Save and run the flow

Save the flow and run it with **Debug**. The screen shows the label, the formatted value and the description.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fa4hYWyLmjvBTQVk5xSgD%2Fmetric-screen.png?alt=media" alt="A Metric on a flow screen: an avatar, the label Open Pipeline, a currency value, a green trend badge and a description underneath"><figcaption><p>The finished Metric on a flow screen, here with an avatar and a secondary value carrying a trend badge.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Configuration

Click the Metric on the Flow screen. The **Edit Metric Component** panel opens with three tabs: **Properties**, **Interactions** and **Style**. The sections below follow the **Properties** tab, group by group.

### Properties

| Setting         | What it does                                                              |
| --------------- | ------------------------------------------------------------------------- |
| **Label**       | Text shown above the value.                                               |
| **Description** | Text shown below the value, for context such as the period or the source. |

### Avatar

Shows an avatar next to the value, for example a dollar icon beside a revenue figure or a team photo beside a team total.

| Setting              | What it does                                                                                       |
| -------------------- | -------------------------------------------------------------------------------------------------- |
| **Image**            | URL of the image to display.                                                                       |
| **Initials**         | Letters shown when there is no image.                                                              |
| **Icon Name**        | SLDS icon shown when there is no image, for example `standard:opportunity`.                        |
| **Variant**          | **Circle** or **Square**.                                                                          |
| **Size**             | From **X-Small** to **XX-Large**.                                                                  |
| **Alternative Text** | Text read by screen readers.                                                                       |
| **Position**         | Where the avatar sits relative to the value: **Left** (default), **Right**, **Bottom** or **Top**. |

### Primary Metric

The main number or date. **Format Style** comes first because it changes what the rest of the group shows.

| Setting                                                         | What it does                                                                                                                                                                   |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Format Style**                                                | **Decimal**, **Percent**, **Percent Fixed**, **Currency** or **Date**.                                                                                                         |
| **Value**                                                       | The number to display. **Manual** takes a number you type, **Mapped** takes a flow resource, **Query** aggregates records (see below). Under **Date**, the field takes a date. |
| **Prefix** / **Suffix**                                         | Text before or after the value, for example `Won:` or `deals`.                                                                                                                 |
| **Tooltip**                                                     | Text shown when the user hovers the value.                                                                                                                                     |
| **Currency Code**                                               | ISO 4217 code such as `USD` or `EUR`. Requires **Format Style** = **Currency**.                                                                                                |
| **Currency Display As**                                         | **Symbol** (default, `$`), **Code** (`USD`) or **Name** (`US dollars`). Requires **Format Style** = **Currency**.                                                              |
| **Value Sign**                                                  | **Negative Only** (default) shows a minus sign on negative values only. **Positive and Negative** also adds `+` to positive values.                                            |
| **Minimum Integer Digits**                                      | Fewest digits before the decimal separator. `3` turns `7` into `007`.                                                                                                          |
| **Minimum Fraction Digits** / **Maximum Fraction Digits**       | Fewest and most digits after the decimal separator.                                                                                                                            |
| **Minimum Significant Digits** / **Maximum Significant Digits** | Fewest and most significant digits.                                                                                                                                            |
| **Show Trend Color**                                            | Colors the value by how it compares to **Trend Breakpoint Value**: above, equal (neutral) or below.                                                                            |
| **Trend Breakpoint Value**                                      | The number treated as neutral, such as a target. Requires **Show Trend Color**.                                                                                                |
| **Trend Icon**                                                  | **Dynamic**, **Arrow** or **Caret**. Requires **Show Trend Color**.                                                                                                            |

The digit settings and the three trend settings appear for every **Format Style** except **Date**.

#### Format Style values

| Format Style      | What it does                                    | Example                               |
| ----------------- | ----------------------------------------------- | ------------------------------------- |
| **Decimal**       | Plain number with thousands separators.         | `482500` shows `482,500`              |
| **Percent**       | Multiplies by 100 and adds `%`.                 | `0.42` shows `42%`                    |
| **Percent Fixed** | Adds `%` without multiplying.                   | `42` shows `42%`                      |
| **Currency**      | Currency amount in **Currency Code**.           | `482500` in `USD` shows `$482,500.00` |
| **Date**          | Date or time, shaped by the date options below. |                                       |

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FHxibDBgdcv64Vm6uSNnv%2Fmetric-format-result.png?alt=media" alt="Three Avonni Metrics on a flow screen: Won This Quarter US$482,500, Win Rate 42%, Next Close Date Sat, Nov 28, 2026" width="450"><figcaption><p>One component, three Format Styles: currency, percent and a written-out date.</p></figcaption></figure>

#### Value from a query

In **Query** mode, **Value** runs one aggregate over an object. Pick the object, then:

| Setting                       | What it does                                                                                                                                               |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Field**                     | The field to aggregate, for example `Amount`.                                                                                                              |
| **Aggregate Function**        | **Average**, **Count**, **Count Distinct**, **Maximum**, **Minimum** or **Sum**.                                                                           |
| **Treat Blank Value as Zero** | Counts blank values of the field as `0` in the aggregate.                                                                                                  |
| **Filters**                   | Which records to include. **Manual** builds conditions visually. **Mapped** takes a Text Formula resource, which re-runs the query when its inputs change. |

The [Show a KPI from a query](https://docs.avonnicomponents.com/flow/tutorials/components/metric/show-a-kpi-from-a-query.md) tutorial builds one end to end. For how queries work in general, see [Query](https://docs.avonnicomponents.com/flow/component-builder/data-sources/query.md).

#### Date options

Shown when **Format Style** is **Date**. Each one adds a part to the date, and leaving one empty leaves that part out.

| Setting                            | Options                                                                                                                                        |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **Day**                            | **2 digit**, **numeric**                                                                                                                       |
| **Month**                          | **2 digit**, **Narrow**, **Short**, **Long**                                                                                                   |
| **Year**                           | **2 digit**, **numeric**                                                                                                                       |
| **Weekday**                        | **Narrow**, **Short**, **Long**                                                                                                                |
| **Era**                            | **Narrow**, **Short**, **Long**                                                                                                                |
| **Hour** / **Minute** / **Second** | **2 digit**, **numeric**                                                                                                                       |
| **Hour 12**                        | Shows the time on a 12-hour clock.                                                                                                             |
| **Timezone**                       | IANA time zone such as `America/New_York`. The browser's zone by default. Set `UTC` for a Date field, or users west of UTC see the day before. |
| **Timezone Name**                  | **Short** or **Long**.                                                                                                                         |

{% hint style="info" %}
When **Show Trend Color** is on, the value takes its color from the **Trend** group of the **Style** tab (negative, neutral, positive), not from the **Value** group.
{% endhint %}

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fm6hSPjQYr68VS9A8nrx8%2Fmetric-trend-states.png?alt=media" alt="Three Avonni Metrics against a 500,000 breakpoint: Below target US$482,500 red with a down caret, On target US$500,000 neutral with a right caret, Above target US$520,000 green with an up caret" width="450"><figcaption><p>Show Trend Color compares the value with the Trend Breakpoint Value: below, equal, above.</p></figcaption></figure>

### Secondary Metric

A second value next to the main one, such as the target or the gap to it.

It has its own **Format Style** and **Secondary Value**, and repeats the primary settings: **Prefix**, **Suffix**, **Currency Code**, **Currency Display As**, **Value Sign**, the digit settings, **Show Trend Color**, **Trend Breakpoint Value**, **Trend Icon** and the date options. It has no **Tooltip**.

| Setting      | What it does                                                                                                      |
| ------------ | ----------------------------------------------------------------------------------------------------------------- |
| **Position** | Where the secondary value sits relative to the primary one: **Right** (default), **Bottom**, **Left** or **Top**. |

With **Show Trend Color** on, the secondary value renders as a colored badge whose colors and corner radius come from the **Secondary Trend** style group. The secondary value never computes anything from the primary one: to show a gap, compute it in the flow and map it.

The secondary **Trend Breakpoint Value** appears only while the primary **Show Trend Color** is on. The secondary **Trend Icon** follows the secondary toggle.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F3MB8yRHjt0lras0OuMBt%2Fmetric-trend-secondary-panel.png?alt=media" alt="Component Builder: primary Show Trend Color on, Trend Breakpoint Value 500,000, Trend Icon Caret; Secondary Metric with Format Style Currency, Secondary Value 500,000, Prefix Target, Position Bottom, Currency Code USD" width="320"><figcaption><p>The trend on the primary value, and the target as a secondary value under it.</p></figcaption></figure>

### Label Link

Turns the label into a link. Choose a **Page Reference Type**, then fill in the fields that type asks for:

| Page Reference Type      | Fields                                                                 |
| ------------------------ | ---------------------------------------------------------------------- |
| **Record Page**          | **Object Api Name**, **Record Id**, **Action Name**                    |
| **Object Page**          | **Object Api Name**, **Action Name**                                   |
| **External URL**         | **Url**                                                                |
| **External Record Page** | **Record Id**, **Object Info**, **CMS Source Name**, **CMS Type Name** |

The label link has no window setting. To open a page in a new window, use a **Navigate** interaction on the value instead: its **Target** offers **Current Window** and **New Window**.

***

## Interactions

[Interactions](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel.md) run when the user clicks a value. Set them in the **Interactions** tab. A value becomes clickable only once it has at least one interaction, and clicks do nothing in the Component Builder preview: test them in a running flow.

### Primary Metric Click

Runs when the user clicks the primary value. Typical uses: open the records behind the number with **Navigate**, show details in an **Open Flow Dialog**, or move to the next screen with **Flow Navigation** and branch on the output variable below.

### Secondary Metric Click

Runs when the user clicks the secondary value. Same actions as the primary click.

When the interactions include **Open Flow Dialog**, the **Style** tab adds a **Flow Dialog** group.

***

## Styling

The **Style** tab sets the Metric's look. See [Style panel](https://docs.avonnicomponents.com/flow/component-builder/style-panel.md) for how the settings work.

{% tabs %}
{% tab title="Margin" %}
Outer spacing between the metric and other components on the screen.

* **Top / Right / Bottom / Left:** Space on each side.
  {% endtab %}

{% tab title="Padding" %}
Inner spacing between the metric's content and its edges.

* **Top / Right / Bottom / Left:** Spacing on each side.
  {% endtab %}

{% tab title="Size" %}
The metric's dimensions.

* **Width / Height:** Fixed dimensions.
* **Min Width / Max Width / Min Height / Max Height:** Bounds on the size.
* **Overflow:** What happens to content larger than the bounds.
  {% endtab %}

{% tab title="Border" %}
The border around the metric.

* **Color**, **Size**, **Style** (solid, dashed, dotted) and **Radius**.
  {% endtab %}

{% tab title="Background" %}

* **Color:** Background color behind the metric, for example a light tint for a KPI tile.
  {% endtab %}

{% tab title="Alignment" %}

* **Alignment:** Alignment of the label, value and description.
* **Secondary Alignment:** Alignment of the secondary value group.
  {% endtab %}

{% tab title="Label" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight**.
* **Line Clamp:** Maximum number of lines before the label is cut.
  {% endtab %}

{% tab title="Description" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight**.
* **Line Clamp:** Maximum number of lines before the description is cut.
  {% endtab %}

{% tab title="Value" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight**.
* **Line Height:** Line height of the value.
  {% endtab %}

{% tab title="Prefix" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight** of the text before the value.
  {% endtab %}

{% tab title="Suffix" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight** of the text after the value.
  {% endtab %}

{% tab title="Secondary Value" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight** of the secondary value.
  {% endtab %}

{% tab title="Secondary Prefix" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight** of the text before the secondary value.
  {% endtab %}

{% tab title="Secondary Suffix" %}

* **Color**, **Font Size**, **Font Style**, **Font Weight** of the text after the secondary value.
  {% endtab %}

{% tab title="Trend" %}
Colors of the primary value when **Show Trend Color** is on.

* **Negative / Neutral / Positive Color:** One color per direction.
  {% endtab %}

{% tab title="Secondary Trend" %}
The secondary trend badge.

* **Negative / Neutral / Positive Color:** Text color per direction.
* **Negative / Neutral / Positive Background Color:** Badge color per direction.
* **Negative / Neutral / Positive Radius:** Corner radius per direction.
  {% endtab %}

{% tab title="Avatar" %}

* **Icon Background Color / Icon Foreground Color:** Colors of the fallback icon.
* **Initials Color / Initials Color Hover / Initials Font Weight:** Style of the initials.
* **Border Color / Border Style / Border Size / Border Radius:** The avatar border.
* **Vertical Alignment:** Alignment of the avatar against the text.
  {% endtab %}

{% tab title="Flow Dialog" %}
Appears only when an interaction uses **Open Flow Dialog**. Sets the size and background of that dialog.
{% endtab %}
{% endtabs %}

***

## Output Variables

Reference these after the screen: in a Decision or Assignment, pick the screen's Metric component and then the output variable.

### Metric Clicks

| Output variable              | Type    | What it returns                                                  |
| ---------------------------- | ------- | ---------------------------------------------------------------- |
| **Primary Metric Clicked**   | Boolean | `true` when the user clicked the primary value on this screen.   |
| **Secondary Metric Clicked** | Boolean | `true` when the user clicked the secondary value on this screen. |

> **Example:** A forecast screen shows "Deals closing this week: 7". Clicking it moves to the next screen, and a Decision on **Primary Metric Clicked** equals `true` sends the rep to a list of those deals instead of the submit step. The [Branch the flow on a metric click](https://docs.avonnicomponents.com/flow/tutorials/components/metric/branch-the-flow-on-a-metric-click.md) tutorial builds it.

### Flow Interaction Output Variables

The generic outputs that every interaction can set are described in [Flow Interaction Output Variables](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/flow-interaction-output-variables.md).

***

## Troubleshooting Common Issues

| Problem                                                    | Cause                                                                                            | Fix                                                                                                |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| Clicking the value does nothing                            | The value has no interaction, so it is not clickable.                                            | Add a **Primary Metric Click** or **Secondary Metric Click** interaction.                          |
| A click works in the flow but not in the Component Builder | Clicks are ignored in the preview.                                                               | Test from **Debug** or a running flow.                                                             |
| A query metric shows `0` or fewer records than expected    | A filter compares a number field to `0`. A blank field is not `0`, so those records are skipped. | Keep **Equals** and set the value to the global constant `Null`, or add a second condition for it. |
| A query metric with **Custom Logic** fails to load         | The logic mixes `AND` and `OR` without parentheses.                                              | Group the conditions, for example `1 AND (2 OR 3)`.                                                |
| A digit or trend setting is missing                        | **Format Style** is **Date**.                                                                    | Those settings only exist for number formats.                                                      |
| A date shows the day before                                | **Timezone** is empty, so the date is read in the user's browser zone.                           | Set **Timezone** to `UTC` for a Date field.                                                        |
| The **Flow Dialog** style group is missing                 | No interaction uses **Open Flow Dialog**.                                                        | Add the interaction first.                                                                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/flow-components/metric.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
