> For the complete documentation index, see [llms.txt](https://docs.frontnow.com/advise/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frontnow.com/advise/integration/methods.md).

# Methods

{% hint style="info" %}
Before using these methods, ensure that Frontnow Advise has been properly initialized. For setup instructions, please refer to the [Getting Started](/advise/introduction/getting-started.md) page.
{% endhint %}

### `isReady()`

Checks if Frontnow Advise is ready.

**Returns:**

* `boolean` - `true` if the advisor is ready, otherwise `false`.

**Example usage:**

```javascript
if (advisor.isReady()) {
    console.log('Advisor is ready!');
}
```

### `open()`

Opens Frontnow Advise widget.

**Example usage:**

```javascript
advisor.open();
```

### `close()`

Closes the Frontnow Advise widget.

**Example usage:**

```javascript
advisor.close();
```

### `showEoC()`

Opens the Frontnow "End of Conversation" widget.

**Example usage:**

```javascript
advisor.showEoC();
```

### `closeEoC()`

Closes the Frontnow "End of Conversation" widget.

**Example usage:**

```javascript
advisor.closeEoC();
```

### `showLauncher()`

Shows Frontnow Advise launcher button.

**Example usage:**

```javascript
advisor.showLauncher();
```

### `hideLauncher()`

Hides Frontnow Advise launcher button.

**Example usage:**

```javascript
advisor.hideLauncher();
```

### `sendMessage(message)`

Sends a message to Frontnow Advise.

**Parameters:**

* `message` (`string`) - The message to send to the advisor.

**Example usage:**

```javascript
advisor.sendMessage('How can I find the best city bike?');
```

### `stopMessage()`

Stops the current message loading in Frontnow Advise.

**Example usage:**

```javascript
advisor.stopMessage();
```

### `updateTargetElement(`newTargetElement`)`

Updates the target element for the Frontnow Advisor. This method is only applicable when using custom targeting.

**Parameters:**

* `newTargetElement` (`HTMLElement`): The new HTML element to target.

**Disclaimer:**

This method should only be used if you are implementing custom targeting for the Frontnow Advisor. Ensure that the `newTargetElement` parameter is a valid HTML element.

**Example usage:**

```javascript
const newTarget = document.getElementById('custom-target');
if (newTarget) {
    advisor.updateTargetElement(newTarget);
}
```

**Notes:**

* The current advisor instance will close before updating the target element.
* The `advisorContainer` will be removed and reinitialized to target the new element.

### `openNewChat()`

Opens a new chat in the Frontnow Advisor.

**Example usage:**

```javascript
advisor.openNewChat();
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.frontnow.com/advise/integration/methods.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
