> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-work-dev.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Access Custom Data in Agent AI

Custom data is additional information — such as agent name, ID, or other metadata — passed from third-party applications into the Agent AI widget. Use it to personalize interactions, streamline workflows, and provide more context-specific responses.

Custom data uses the format: `{{context.session.UserContext.customData.<key>}}`

It's stored in the `UserContext` variable and is accessible wherever `UserContext` is available, including Welcome Events and Dialog Tasks.

***

## Access Custom Data in Welcome Events

1. Sign in to XO11.

2. Select an app from the **App list**.

3. Select **Agent AI** > **Configurations** > **Welcome Events**.

4. Expand the **Configure Greeting Messages** section.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/YQs6cUBex9uqKEMD/ai-for-service/agentai/agent-experience/access-custom-data-images/configure-greeting-messages.png?fit=max&auto=format&n=YQs6cUBex9uqKEMD&q=85&s=275ac8e08a5ec37c3473ac7c988f8c02" alt="Configure Greeting Messages" width="1530" height="781" data-path="ai-for-service/agentai/agent-experience/access-custom-data-images/configure-greeting-messages.png" />

5. Select **Edit** on a greeting message where you want to use custom data.

   <Note>If no greeting messages exist, create one first. See the Welcome Event documentation.</Note>

6. In the **Message** field, reference your custom data using the `{{context.session.UserContext.customData.<key>}}` format.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/YQs6cUBex9uqKEMD/ai-for-service/agentai/agent-experience/access-custom-data-images/edit-welcome-message.png?fit=max&auto=format&n=YQs6cUBex9uqKEMD&q=85&s=67d3c0d1eae42c41563a60ba0c29cba3" alt="Edit Welcome Message" width="620" height="871" data-path="ai-for-service/agentai/agent-experience/access-custom-data-images/edit-welcome-message.png" />

***

## Access Custom Data in Dialog Tasks

1. Sign in to XO11.

2. Select an app from the **App list**.

3. Select **Automation AI** > **AI Agent**.

4. Open an existing Dialog Task from the **Dialogs** page.

   <Note>If no Dialog Tasks exist, create one first. See the Dialog Builder documentation.</Note>

5. Open a **Message** node.

6. On the **Component Properties** page, go to the **User Prompts** or **Error Prompts** field.

7. Select **Text** or **Custom JavaScript** to enter your custom data reference.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/YQs6cUBex9uqKEMD/ai-for-service/agentai/agent-experience/access-custom-data-images/component-properties.png?fit=max&auto=format&n=YQs6cUBex9uqKEMD&q=85&s=2513d68f8040852baf81691dccfc132f" alt="Component Properties" width="1908" height="891" data-path="ai-for-service/agentai/agent-experience/access-custom-data-images/component-properties.png" />


Built with [Mintlify](https://mintlify.com).