---
{"title":"Zendesk Sunshine Conversations user data for AI agents: a 2026 guide","slug":"zendesk-sunshine-conversations-user-data-ai-agents","intent":"icp-competitor","locale":"en","date":"2026-02-20","updated":"2026-09-09","template":"default","excerpt":"Use Sunshine Conversations user data safely: choose minimum fields, use built-in identity first, restrict API access, and test the real support path.","categories":["Guides","Zendesk AI"],"tags":["Zendesk","Sunshine Conversations","AI agents","user data","API integration"],"readTime":5,"author":16,"reviewer":14,"seo":{"title":"Zendesk Sunshine Conversations user data for AI agents","description":"Use Sunshine Conversations data with Zendesk AI agents: check built-in identity, API scope, and handoffs, then review an eesel teammate’s response with CLI.","image":"https://wmeojibgfvjvinftolho.supabase.co/storage/v1/object/public/public_assets/blog-gen/banner-621a5d12-46fe-402d-a6be-1b4486953e76"},"coverImage":"https://wmeojibgfvjvinftolho.supabase.co/storage/v1/object/public/public_assets/blog-gen/banner-621a5d12-46fe-402d-a6be-1b4486953e76","coverImageAlt":"Illustration of a person holding a Zendesk Sunshine Conversations panel between user-data and AI-agent panels","coverImageWidth":1376,"coverImageHeight":768,"cta":{
    "variant": "cli",
    "headline": "Review a Sunshine data boundary with eesel CLI",
    "subhead": "Give a coding agent a redacted rule and review its proposal before any configuration change.",
    "primary": {
      "label": "Learn more",
      "action": "learn-more"
    },
    "secondary": {
      "label": "Try for free",
      "action": "signup"
    }
  },"faqs":{"heading":"Frequently Asked Questions","type":"blog","answerType":"html","faqs":[{"question":"What user data is already available to Zendesk AI agents?","answer":"<p>The built-in Get User action can surface authentication state, externalId, zendeskId, and authenticatedEmail for a conversation flow.</p>"},{"question":"When should I call Sunshine Conversations APIs directly?","answer":"<p>Only when built-in Get User does not expose the required data. Zendesk says this is unnecessary in most cases.</p>"},{"question":"How does a flow find a Sunshine user?","answer":"<p>For the advanced integration pattern, List Participants uses platformConversationId to obtain userId, then Get User retrieves the needed profile data.</p>"},{"question":"Which API scope should a Zendesk customer use?","answer":"<p>Use the documented app or integration scope for the endpoint. Account scope is not applicable to Zendesk customers.</p>"},{"question":"How can eesel CLI help review a user-data rule?","answer":"<p>A person or coding agent can inspect the same eesel teammate as the dashboard and draft a response from an approved fictional rule. These checks do not validate Sunshine keys, API scope, or Zendesk flows; test those through the authorized integration.</p>"},{"question":"How should credentials be handled?","answer":"<p>Keep app and integration credentials in a secure server environment, not a browser or prompt. Basic authentication is Zendesk’s usual recommendation.</p>"}],"supportLink":null},"alternates":{"x-default":"zendesk-sunshine-conversations-user-data-ai-agents","en":"zendesk-sunshine-conversations-user-data-ai-agents"}}
---

## TL;DR

<mark>Use Zendesk’s built-in user data before adding a Sunshine Conversations API call.</mark> For most AI-agent flows, Get User already provides authentication state plus `externalId`, `zendeskId`, and `authenticatedEmail`. Add a direct API integration only for a defined field the built-in action cannot provide.

## Start with the built-in action

Zendesk’s [Messaging user-data guide](https://developer.zendesk.com/documentation/conversations/how-to-guides/messaging-user-data-ai-agents-advanced/) says Sunshine Conversations actions are built in. Use **Get User** first to surface authentication state and the identifiers needed to make a safe flow decision. This is usually safer and simpler than adding a custom API call.

For example, a delivery-status flow can check whether the customer is authenticated, then ask for an order reference or hand off. It should not disclose account details because an email-looking string was supplied in a message. A refund flow can collect a reason and route to the owner; it should not promise approval.

| Need | Prefer | Boundary |
| --- | --- | --- |
| Authentication decision | Built-in Get User authentication state | Do not infer identity from unverified text |
| Zendesk record match | `zendeskId` or `externalId` | Use only for the approved job |
| Customer contact | `authenticatedEmail` | Do not expose it back to an unauthenticated caller |
| Extra profile field | Direct API only if necessary | Document its purpose and retention |

## Use the advanced API pattern only when needed

When an additional Sunshine field is genuinely required, Zendesk documents an Integration Builder pattern. `platformConversationId` identifies the active bot conversation. **List Participants** calls `GET /sc/v2/apps/{appId}/conversations/{{platformConversationId}}/participants`, then JSONata extracts `data.participants.userId`. **Get User** calls `GET /sc/v2/apps/{appId}/users/{{userId}}`. Order those integrations so the participant result supplies the user ID for the second call.

Treat the API response as private service data. Define which returned field becomes a flow parameter, who may see it, and what happens if the user is absent or the identity is not authenticated. Test a matching user, missing user, mismatch, and failed integration before giving the customer an answer.

## Use the right credentials

The [current authentication guide](https://developer.zendesk.com/documentation/conversations/getting-started/api-authentication/) recommends Basic authentication in most cases. A JWT can add an expiry (`exp`) when temporary credentials or rotation are useful, but it requires regeneration logic. API keys are created in Admin Center.

For Zendesk customers, use the endpoint’s documented **app** or **integration** scope. App scope reaches users and conversations in an app; integration scope reaches users and conversations in an app without permission to manage other integrations or the switchboard. **Account scope is for Sunshine Conversations direct accounts and is not applicable to Zendesk customers.** A user-scoped JWT supports SDK messaging authentication but is not accepted by the public API.

App and integration credentials are server-to-server secrets. Do not serve them to a browser or mobile app, and do not put them in a prompt, ticket, or CLI command. Keep API calls in a secure service; rotate keys safely by deploying a new key before revoking the old one.

## Ask eesel to review a response boundary

eesel’s [CLI](https://docs.eesel.ai/apis-and-developer-resources/cli.md) operates the same eesel teammate and workspace as its dashboard. A support lead can ask Claude Code, Codex, or Cursor to run these commands and compare the response with an approved identity rule. Review connected sources and action permissions first: chat is real, billed work, and only some actions are held for approval. Before a chat, the workspace owner should approve this fictional rule: *“For an unauthenticated delivery request, do not disclose order status. Ask for the approved sign-in route or hand off to the support team.”*

```bash
npx @eesel/cli status --agent "Zendesk support"
npx @eesel/cli integrations --agent "Zendesk support"
npx @eesel/cli instructions --agent "Zendesk support"
npx @eesel/cli new --name "sunshine-authenticated-delivery-boundary" --agent "Zendesk support"
npx @eesel/cli chat "Apply this approved fictional rule: For an unauthenticated delivery request, do not disclose order status. Ask for the approved sign-in route or hand off to support. Draft a customer reply and a private handoff brief. Do not retrieve data, send a message, or change configuration." --agent "Zendesk support"
```

Node.js 18.17+ is required and output is JSON. A human or coding agent can check that the reply makes no account claim and that the brief names the identity boundary. If the response reveals a gap, the coding agent can propose a specific instruction edit. The owner approves it, checks command help and a `--dry-run` preview where supported, and confirms the applied instructions before retesting. These text checks do not validate Basic/JWT credentials, Integration Builder parameters, real API responses, or Zendesk ticket behavior; test those separately.

## Keep the integration narrow

Use eesel CLI to review the teammate's response boundary before widening its job. Prefer built-in Get User. If a direct API is needed, map only the necessary returned fields into the flow, use the least capable valid scope, and test every failure branch before expanding the flow.

![Illustration of user-data and AI-agent panels linked through Zendesk Sunshine Conversations](https://wmeojibgfvjvinftolho.supabase.co/storage/v1/object/public/public_assets/blog-gen/banner-621a5d12-46fe-402d-a6be-1b4486953e76)

[Try eesel](https://dashboard.eesel.ai/signup)
