When a user clicks a button, the link opens
To set up this Global action:
- Add the Step name to the Set up Global Actions (RWC) Step.
- In the Step, click + Add custom action.
- In Process as, select Button from the dropdown.
- Choose the button icon from Google Material Icons. In Icon, write the name exactly as on the website in the snake case. For example,
shopping_cart
. The integration will upload it on the RWC client. - In Lable, write your button name. The chat user will be able to read it when they hover the button icon.
- In Action type, select Open URL from the dropdown.
- In Provide URL paste URL starting with
http://
orhttps://
. - Save and activate the Flow.
Result
When the Flow reaches the Set up Global Action (RWC) Step, the button becomes available in the chat. Once a user clicks it, the link opens in a new tab.
To hide the existing Global action button from the chat
The Flow has the Set up Global Actions (RWC) Step that adds the Global action button to the chat. If at a certain point in the conversation, you want to hide the button from the chat or change how it is processed, override the Step.
Add the second Set up Global Actions (RWC) Step below the first Step further in the Flow. The names of the two Steps can be different. Set up the second Step according to the instructions above, but in Icon and Lable, provide values from the first Step and leave the Provide URL field empty. As a result, when the Flow reaches the second Set up Global Actions (RWC) Step, the button disappears from the chat.
Instead of hiding the button, you can also change the link it opens by providing another one in the Provide URL field. To change button processing to running a JavaScript on the client, select JavaScript code instead of Open URL in Action type.