> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# scrollToMessage()

Scrolls the chat view to a specific message by its ID.

## Syntax

```javascript theme={null}
instance.scrollToMessage(messageId);
```

## Parameters

<ParamField path="messageId" type="string" required>
  The unique identifier of the message to scroll to.
</ParamField>

## Returns

<ResponseField name="void">
  Returns a `void` operator.
</ResponseField>

## Examples

The following example scrolls to a specific message:

```javascript theme={null}
// Scroll to a specific message
const messageId = 'msg-12345';
instance.scrollToMessage(messageId);
```

<Card title="Do you need practical examples?" icon="text-align-start" href="https://www.ibm.com/docs/SSAVQO/deploy/web_chat_agent/tutorials/tutorials_lp.html" arrow="true" cta="Learn with walk-throughs" horizontal>
  Learn how to apply the features available for embedded chat into your implementation with guidance and examples.
</Card>
