---
title: "Contact Support"
canonical_url: "https://docs.sportradar.com/resources/virtual-stadium/docs/web/widgets/virtualStadium/features/contactSupportButton"
markdown_url: "https://docs.sportradar.com/resources/virtual-stadium/docs/web/widgets/virtualStadium/features/contactSupportButton.md"
last_updated: "2026-02-24T11:02:34Z"
---

# Contact Support

![Contact Support Button Demo](https://docs.sportradar.com/resources/virtual-stadium/static/static/gif/contact-support-button-demo.gif)

The **Contact Support** functionality allows you to provide user support whenever a user clicks the Contact Support button. This button is displayed only if the user is authenticated and all the necessary steps to enable this module have been completed.

The button is shown whenever an error is displayed, and its behavior is managed through the [`onAction`](#2-handle-contact-support-action) callback.

***

## Setup

### 1. Enable the Contact Support Button

To enable the Contact Support Button within your Virtual Stadium widget, set the `enableContactSupportButton` property to `true` during widget initialization:

**`enableContactSupportButton`** `boolean` ***optional***

Enables the Contact Support Button functionality.

***Enable Contact Support Button:***

```javascript
SIR('addWidget', '#sr-vs-widget', 'virtualStadium', {
    enableContactSupportButton: true,
    ...restProps
});
```

### 2. Handle Contact Support Action

When a user clicks on a contact support button, an **action** is triggered. This action invokes the `onAction` callback and returns the following data structure:

**`onAction`** `(type: string, data: object) => void` ***optional***

Callback function triggered when specific events occur in the widget.

**Parameters:**

**`type`** `string` ***required***

Action type: `"ContactSupport"`.

**`data`** `object` ***required***

Action data containing error information.

**`data.channelId`** `string` ***required***

Unique identifier of the chat channel where the error occurred.

**`data.error`** `object` ***required***

Error information object containing details about the error that triggered the support request.

***Handling Contact Support Actions:***

```javascript
function onAction(type, data) {
    switch (type) {
        case 'ContactSupport': {
            const { channelId, error } = data;

            // IMPORTANT: Implement your support workflow
            // - Open a support chat/ticket system
            // - Send error details to your support team
            // - Provide user with immediate assistance options
            // - Log the incident for quality monitoring

            // Example: Open support chat or redirect to help page
            // window.open('/support?channel=' + channelId, '_blank');

            // Example: Send error to your logging/monitoring system
            // logErrorToService(error, channelId);

            break;
        }
        default: {
            console.log('Unhandled action type:', type);
        }
    }
}

SIR('addWidget', '#sr-vs-widget', 'virtualStadium', {
    enableContactSupportButton: true,
    onAction: onAction,
    ...restProps
});
```
