# Progress Indicator

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F7Nrc5cdczrjYJpaM726T%2Fimage%20(47).avif?alt=media&#x26;token=bcd8b7d9-3c29-4ab8-92c1-ae9248c2c665" alt="" width="375"><figcaption></figcaption></figure>

***

## Tutorials

### Getting Started

<table data-view="cards"><thead><tr><th></th><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>Watch Tim Combridge's guided video tutorial</strong></td><td>Tim Combridge demonstrates how to create a user-friendly progress indicator within Salesforce Flow using router navigation</td><td></td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FDlnSPEKtqQ3JTZpr5afF%2Fimage%20(1).avif?alt=media&#x26;token=d97985b1-26b6-4389-9727-c5ec9228bfc3">image (1).avif</a></td><td><a href="https://www.linkedin.com/posts/tim-combridge_avonni-salesforce-salesforceflow-activity-7207245371687792640-N_BU">https://www.linkedin.com/posts/tim-combridge_avonni-salesforce-salesforceflow-activity-7207245371687792640-N_BU</a></td></tr></tbody></table>

### Building Progress Indicators

<table data-view="cards"><thead><tr><th></th><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>Creating Navigational Screen Flows in Router Mode</strong></td><td>Learn how to build a progress indicator that helps users easily navigate through your multi-screen flow.</td><td></td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FG2oRSPtghjVQh9dQHZDU%2Fimage.webp?alt=media&#x26;token=70b6583e-1048-43df-be38-f47b4a437886">image.webp</a></td><td><a href="../tutorials/projects/creating-navigational-screen-flows-in-router-mode">creating-navigational-screen-flows-in-router-mode</a></td></tr><tr><td><strong>Business Quote with vertical progress indicator</strong></td><td>Create a progress indicator that guides users through your flow, updating automatically as they move between screens.</td><td></td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FaZF8qatLzN8OzES36pTa%2Fimage.gif?alt=media&#x26;token=60c74600-84b5-4120-869e-b743d938960b">image.gif</a></td><td><a href="../tutorials/projects/business-quote-with-vertical-progress-indicator">business-quote-with-vertical-progress-indicator</a></td></tr></tbody></table>

### Advanced Techniques

<table data-view="cards"><thead><tr><th></th><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>Creating a Universal Dynamic Progress Step Collection</strong></td><td></td><td></td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FXMeSQEbG9oUpyww8wnNX%2Fimage.avif?alt=media&#x26;token=f331e3dc-3865-45f2-9d0d-0bf761a02466">image.avif</a></td><td><a href="../tutorials/components/progress-indicator/creating-a-universal-dynamic-progress-step-collection">creating-a-universal-dynamic-progress-step-collection</a></td></tr><tr><td><strong>How to Change the Appearance of Your Progress Indicator using a variable</strong></td><td></td><td></td><td></td><td><a href="../tutorials/components/progress-indicator/how-to-change-the-appearance-of-your-progress-indicator-using-a-variable">how-to-change-the-appearance-of-your-progress-indicator-using-a-variable</a></td></tr><tr><td><strong>Error Handling</strong></td><td></td><td></td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F6LUboemQZtyWnCRQuGnj%2Fimage%20(1).webp?alt=media&#x26;token=00258df6-9f97-4784-9d6e-cddd093d79b2">image (1).webp</a></td><td><a href="../tutorials/components/progress-indicator/error-handling">error-handling</a></td></tr></tbody></table>

***

## Changing the Properties

### Indicator Type

You can create progress indicators with different visual styling by specifying the **`type`** attribute.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FH3nPXHC77iFkmmwJc9ne%2F2024-03-26_20-37-52.png?alt=media&#x26;token=325431bc-0dff-49c8-bedc-f7a66340c293" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="137.33333333333331">Type</th><th>Description</th><th>Illustration</th></tr></thead><tbody><tr><td><strong>Horizontal</strong></td><td>Shows progress through a left-to-right sequence, guiding users through tasks or stages efficiently.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F4gcgkFAvIuAvTv3T2ecE%2F2023-06-15_15-27-53.png?alt=media&#x26;token=28021fb7-b7eb-415a-a3e1-93db8bc411ef" alt=""></td></tr><tr><td><strong>Vertical</strong></td><td>Designed to track the progression of tasks or processes in a top-to-bottom layout.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FQ8JgzoHGNAQM4eMqbem7%2F2023-06-16_15-11-57.png?alt=media&#x26;token=16759943-ce42-45f5-ad6a-99c664a573fd" alt=""></td></tr><tr><td><strong>Bar</strong></td><td>Shows task completion as a horizontal fill within a bar, increasing as progress towards the goal advances.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Ff9MUZBEqD54RCr3xWRjT%2F2023-06-15_15-33-30.png?alt=media&#x26;token=3ed02045-3c7b-40ac-85ab-0d3c6dcea45b" alt=""></td></tr><tr><td><strong>Circle</strong></td><td>Visually tracks task completion in a circular path, filling or highlighting as progress is made.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FK07ktTPaIwqv6ikkFuoz%2F2023-06-15_15-35-33.png?alt=media&#x26;token=2abff907-e5b5-4c74-8116-433c75018ec2" alt=""></td></tr><tr><td><strong>Path</strong></td><td>Each step is denoted by a distinct marker, reflecting the flow of the process. </td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FG7gTrPfR98j6aoJPNca1%2F2022-10-31_11-14-08.png?alt=media&#x26;token=123ba14e-db00-475c-9998-00b85e8e4668" alt=""></td></tr><tr><td><strong>Vertical Navigation</strong></td><td>Marks progress through steps in a top-to-bottom layout, visually guiding users through stages or tasks.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F8Ld8MBt3dFnjBieOhKBu%2F2023-06-15_15-47-12.png?alt=media&#x26;token=c1901e61-de68-4ff7-bb99-09241bdb5aa8" alt=""></td></tr></tbody></table>

***

### Adding a Data Source

### **Connect Your Progress Indicator to Salesforce Data**

This is where you link your Progress Indicator to the information it will display:

* [**Manual**](https://docs.avonnicomponents.com/flow/component-builder/data-sources/manual)**:** Type in the steps of your progress indicator yourself.
* [**Variable**](https://docs.avonnicomponents.com/flow/component-builder/data-sources/variable)**:** Connect to an existing data collection in your flow and choose which data points to show at each step.
* [**Picklist**](https://docs.avonnicomponents.com/flow/component-builder/data-sources/picklist)**:** The steps in your progress indicator will automatically match the values in the picklist field you select from Salesforce

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F57oVWN9S2ddzAlCL83DE%2F2024-03-28_21-26-50.png?alt=media&#x26;token=f01860ca-c3fa-4e2b-8b17-b9d3b4ced13a" alt=""><figcaption></figcaption></figure>

***

### Adding a current step

The Avonni progress indicator component helps users visualize their progress by highlighting the current step through a screen flow. You can define the current step in two ways:

**1. Manual Value**

This approach is ideal if the order of steps is fixed and doesn't change based on user input.

* **Data Source:** You have a list of steps defined somewhere (this is your data source). Each step has a "value" attribute, essentially its unique name or identifier.
* **current-step Attribute:** In the Avonni progress indicator component settings, locate the `current-step` attribute. Set this attribute to the specific "value" of the step you want to highlight as current.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FMt1MKxSLahnmmVNYxGMv%2F2024-04-11_20-33-19.png?alt=media&#x26;token=3afeaad3-06e3-46fe-ad2b-fcaea4d8980b" alt=""><figcaption></figcaption></figure>

**Example:**

Let's say you have a three-step flow for onboarding a new user:

* Step 1: "Sign Up" (value attribute: "signup")
* Step 2: "Verification" (value attribute: "verification")
* Step 3: "Welcome" (value attribute: "welcome")

If the user is currently on the "Verification" step, you would set the **`current-step`** attribute of your progress indicator component to "verification".

**2. Flow Variable**

This method is useful when the current step might change dynamically based on user choices or flow logic.

* **Flow Variable:** Create a text variable in your flow to store the value corresponding to the current step (e.g., a text variable called "currentStep"). Update this variable within your flow as the user progresses through the steps.
* **current-step Attribute:** In the Avonni progress indicator component settings, instead of entering a specific value for the **`current-step`** attribute, reference your flow variable using curly braces and an exclamation mark (e.g., {!currentStep}).

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FCDxFk37WXvDNRr3AOb4u%2FDemoCalendarQuery%20V9.gif?alt=media&#x26;token=640a9de1-59c6-43bf-99a1-1d23c95bc098" alt=""><figcaption></figcaption></figure>

**Benefits of Flow Variables**

* **Dynamic Updates:** The progress indicator automatically reflects the current flow position based on your variable's value.
* **Flexibility:** This approach is adaptable to changing flow logic or step order.

**Choosing the Right Method**

* Use a manual value when the steps are fixed and predictable.
* Use a flow variable for adaptability or when the current step depends on user input.

***

### **Show Which Steps Are Finished**

You can show which steps are completed in two ways:

#### **Manually**

* Click "Add item."
* If your steps are fixed (always the same), type in the exact text of the step label.
* If your steps change based on data, type in the API name of the Salesforce field that tracks progress.

#### **Dynamically**

* Use a text collection variable to store a list of the completed steps (e.g., `["Step 1", "Step 2", "Step 3"]`).
* The Progress Indicator will update automatically as items are added or removed from this list.

***

## Adding Interactions

Interactions determine what happens when a user clicks on elements of your progress indicator. Choose from available interactions to customize the experience.

#### **Available Interactions**

* **On `Step Click`:** This event triggers when the user clicks on a step within the progress indicator. You could use this to:
  * Navigate to the corresponding section in your flow.
  * Display additional information about that step.
  * Open a modal or pop-up with more options.
* **On `Step Action Click`:** It allows you to define actions when the user clicks on a specific action associated with a step (if you've added any).

[**Refer to this page**](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel) **for a complete list of supported interactions and learn how to configure them.**

***

## Styling the Progress Indicator

You can adjust the following attributes to customize the appearance of your progress indicator.&#x20;

The options available will depend on the progress indicator type you've chosen.

{% tabs %}
{% tab title="Common Attributes" %}

* **Margin:** Controls the spacing around the outside of the entire progress indicator component.
* **Padding:** Sets the space between the component's border and internal elements.
* **Border:** Customize the border's appearance (style, width, color).
* **Container:** Style the overall box that holds the progress indicator elements
  {% endtab %}

{% tab title="Type-Specific Attributes" %}

* **Horizontal**
  * **Bar:** Modifies the appearance of the progress bar itself.
  * **Icon:** Style the icons associated with each step (if used).
  * **Step Label:** Control the font, text size, color, etc., of step labels.
* **Vertical**
  * **Step Content:** Style the area below a step label where additional descriptive text could be displayed.
  * **Sub-Step Label:** Control the appearance of labels for sub-steps (if applicable).
* **Bar**
  * **Label:** Style the text labels for each segment of the bar.
  * **Value:** Style how the progress value is displayed (if applicable).
* **Circle**
  * **Circle:** Adjust the circle elements' size, color, and outline.
  * **Title:** Style the step titles within or near the circle elements.
* **Path**
  * **Size:** Adjust the size of the path graphic.
* **Vertical Navigation**
  * **Size:** Set the overall width of the vertical navigation bar.

**Important:** Remember that not all types will have all attributes
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avonnicomponents.com/flow/flow-components/progress-indicator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
