# FAQ

## My visitor is being inactive in the conversation, how can I send him/her a message?

You can schedule a message to be sent after a while such as:

```json
{
    "idConversation": "ce41ba2c-c25a-4351-b946-09527d8b940b",
    "idOperator": "ha-456678",
    "replies": [
        {
            "type": "message",
            "payload": {
                "contentType": "text",
                "value": "To download your invoice, just click on the Invoice section into your account settings"
             },
            "quickReplies": []
        },
        {
            "type": "await",
            "duration": {
                "unit": "seconds",
                "value": 120
            }
        },
        {
            "type": "message",
            "payload": {
                "contentType": "text",
                "value": "Can I still help you ?"
             },
            "quickReplies": []
        }
    ],
    "createdAt": "2017-11-22T12:04:00Z",
    "updatedAt": "2017-11-22T12:23:00Z"
}
```

**Explanation:** After 2 minutes, the message `Can I still help you ?` will be sent to the visitor. If the visitor sends a message before the 2 minutes timer, this message is not sent to the conversation.

## **How can I check the availability of a rule before a transfer?**

You can check the availability with the `routingRule` query in our GraphQL API. This query returns a routingRule object in which there is an availability field allowing to know the availability of the different channels.

Here is an example of a query to retrieve the availability on chat channel:

```graphql
query getAvailabilityOfMyRoutingRule {
  routingRule(id: "MY_ROUTING_RULE_UUID") {
    availability {
      chat {
        isAvailable
      }
    }
  }
}
```

And its result:

```json
{
  "data": {
    "routingRule": {
      "availability": {
        "chat": {
          "isAvailable": false
        }
      }
    }
  }
}
```

## My chat notification does not display, even if I went through all the bot creation process and campaign creation process

* Is your browser's main language the same language the bot is configured to chat in? If not, make sure they match
* Is your bot available to chat? Make sure that your bot is available to chat i.e. the availability endpoint is reachable and returns true. [See the availability-strategy endpoint here.](https://docs.iadvize.dev/technologies/implementation/configuration-flow#get-availability)

## My bot is stuck in an infinite loop, it keeps replying to itself.

Mind that all the messages sent in the conversation (whether your bot is the author or not) trigger a call to the `POST /conversations/conversationId/messages`. To avoid replying to yourself, you have to filter on the author. If the author equals `visitor` then you can reply otherwise, just return an empty "replies" array:

```json
{
  idConversation: ...,
  idOperator: ...,
  replies: [], // Empty replies
  createdAt: ...,
  updatedAt: ...
}
```

## My bot always appears to be offline, how can I change that?

Did you implement the [`GET /availability-strategies`](https://docs.iadvize.dev/technologies/implementation/configuration-flow#get-availability) correctly?

## Why is the iAdvize bot selected and not my external bot in the iAdvize admin interface?

Did you implement correctly the following endpoints:

* [`GET /external-bots`](https://docs.iadvize.dev/technologies/implementation/configuration-flow#list-available-scenarios)
* [`PUT /bot/:id`](https://docs.iadvize.dev/technologies/implementation/configuration-flow#create-and-modify-a-bot)
* [`GET /bot/:id`](https://docs.iadvize.dev/technologies/implementation/configuration-flow#get-bot)
