Source: https://nishanth-fern-test.docs-staging.pageloop.ai/web/configure-button-actions-in-a-pop-up

# Configure Button Actions in a Pop-up

Add buttons to a Pop-up to help users take the next step, such as starting a Flow or opening a web page. Each button performs one action when users click it.

## Button Actions

The following table lists the button actions available in a Pop-up and their behavior:

| **Button Action** | **Behavior**                                                                                                                                                     |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Start Flow**    | When the user clicks this button, they are taken to a Whatfix Flow that is attached to the button.                                                               |
| **Attach URL**    | When the user clicks this button, they are taken to the URL that is attached to the button.                                                                      |
| **Skip**          | When the user clicks this button, the particular Pop-up is omitted and they continue to see the Pop-up until they click the Close or Don't show me again button. |
| **Close**         | When the user clicks this button, they close that particular Pop-up.                                                                                             |

> [!INFO]
>
> Additionally, make the following changes in the button configuration menu:
>
> - Change the button **Type** to Primary Button or Secondary Button.
>
> ![Button\_Type](/images/2d/Button_Type-2d90e087.png)
>
> - Click the **Button Style** icon to change the **Color**, **Hover color**, and **Corner radius** of the button.
>
> ![Button\_config](/images/62/Button_config-6222862c.png)
>
> - Click the **Button Resize** icon to resize the button.
>
> ![Button\_resize](/images/ae/Button_resize-ae70ce88.png)
>
> - Click the **Horizontal Align** icon to align the button horizontally.
>
> ![Horizontal Align](/images/e9/Horizontal-Align-e9cb82a3.png)
>
> - Click the **Vertical Align** icon to align the button vertically.
>
> ![Vertical Align](/images/cc/Vertical-Align-cc1e884b.png)

## Configure Button Actions

Expand the following accordions for more details:

**Trigger a Flow from a Pop-up**

A Pop-up can Trigger a Flow to inform your users about a new feature and then guide them through each step of the workflow.

> [!WARNING]
>
> - Ensure that you've created the necessary Flow before creating the Pop-up.
> - If your end user completes the Flow till the end, then the Pop-up does not appear again irrespective of the occurrence count set.
> - If the end user doesn't complete the Flow, the Pop-up appears as per the configured occurrence count.

Use the following steps to attach a flow to a Pop-up using the Visual Editor:

1. Hover your cursor over the button and click to open the **Button configuration menu**. ![Button\_configuration\_menu](/images/42/Screenshot-2024-07-05-at-2.28.49-PM-4276aa2b.png)
2. Next to **Action**, select **Start flow** option from the dropdown. ![Select\_Start\_Flow](/images/ef/Screenshot-2024-07-05-at-2.30.39-PM-efef2cae.png)
3. Click the icon next to **Select Flow**. ![Select\_flow](/images/cd/Screenshot-2024-07-05-at-2.31.46-PM-cdec2846.png)
4. Select the Flow from the list. ![select\_flow](/images/1a/select_flow-1a589f20.png)

**Attach a URL to a Pop-up**

A Pop-up triggers URLs to open links, articles, survey forms, registration forms, and more.

Use the following steps to attach a URL to a Pop-up using the Whatfix Dashboard:

1. Hover your cursor over the button and click to open the button configuration menu. ![](/images/b7/image-247-b721b367.png)
2. Next to **Action**, select the **Attach URL** option from the dropdown menu. ![](/images/91/Screenshot-2024-07-07-at-10.51.23-PM-915b2f4d.png)
3. Paste the copied URL into the **Enter URL** field. ![](/images/db/Screenshot-2024-07-07-at-10.53.20-PM-dbb91032.png)

> [!INFO]
>
> - Use a dynamic URL to keep the button's URL valid when part of the domain changes, such as the subdomain or environment.
> - A dynamic URL adjusts automatically, so the same link works on both <https://dev.example.com> and <https://example.com>.
> - To create a dynamic URL, wrap the dynamic part of the URL in curly braces when you enter it in the **Enter URL** field, as shown in the following image:![](/images/b9/2024-11-11_08-57-36-b9c5be3f.png)

The primary button is associated with a positive user action based on the Pop-up's contents. For example, trigger a flow or open a URL.

The Secondary Button is used to close or dismiss the Pop-up without triggering any specific action.
