# Device State Switch

This action can switch the current flow based on the configured device state event. Use this action to react to device specific events on your channel.

![](https://2532694803-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPD9c4fJbXSAZcPHt9%2F-LfnLfpIpiVhXFnzmM3P%2F-LfnQp0VzNOO_bXL_kqy%2Fimage.png?alt=media\&token=dc47d7b3-d021-45d4-8e27-107a81985602)

### Settings

The action uses the following settings:

| Setting          | Description                                                                             | [Parsed](https://docs.xenioo.com/actions-and-operations/dynamic-parsing) |
| ---------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| State            | The device state you want to control                                                    | :no\_entry:                                                              |
| Custom State Key | The custom state key value you want to control when you select a custom state condition | :white\_check\_mark:                                                     |
| Criteria         | The criteria you would like to apply to the control switch.                             | :no\_entry:                                                              |

### Remarks

This action has no remarks

### Trigger

On Condition Met. This action will trigger any child operation as the selected privacy flag meets the set criteria.

### Variables

This action does not produce any variable.

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |

This action can be used only at [Bot Global level](https://docs.xenioo.com/execution#global-and-local-actions) or [Behavior level.](https://docs.xenioo.com/execution#global-and-local-actions) This action is available only to [Premium Accounts](https://docs.xenioo.com/basic-concepts/your-account/the-free-plan).


---

# 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.xenioo.com/actions-and-operations/iot/xenioo.bots.actions.base.devicestateconditionaction.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.
