Data Access Tools
The Data Access tool category provides two foundational tools — list_records and get_record — that let you browse, search, and inspect any resource in your Yaplet organization. These are the starting point for most workflows.
Overview
Data Access tools are the backbone of every workflow. Before you can update a widget, edit a chatbot, or check campaign stats, you typically need to find the resource first. These two tools give you read-only access to every resource type in your organization.
list_records
Lists records of a specific resource type in your organization. Returns a summary view of each record (not full details — use get_record for that).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The resource type to list. See available types below. |
limit | number | No | How many records to return. Default: 50, max: 300. |
from | number | No | Pagination offset (conversations, visitors, tickets, shifts and subscribers). Default: 0. |
chatbotId | string | Conditional | Required when listing chatbot documents or conversation starters. |
knowledgebaseId | string | Conditional | Required when listing KB articles or categories. |
documentationId | string | Conditional | Required when listing documentation categories or pages. |
boardId | string | Conditional | Required when listing tickets. |
category | string | No | Filter for conversations: "all", "my-inbox", "unassigned", or "calls" (voice conversations). |
channels | array | No | Filter for conversations — limit to these channels. Any of "widget", "facebook", "instagram", "voice". |
widgetId | string | No | Filter for conversations — limit to a single widget. |
updatedSince | string | No | Filter for conversations — an ISO timestamp. Returns only conversations updated after it. Use this for polling. |
includeAnonymous | boolean | No | Filter for visitors — also include visitors who never held a conversation (raw page traffic). |
publishedOnly | boolean | No | Filter for articles and documentation pages — only return published items. |
boardColId | string | No | Filter for tickets — only tickets sitting in that column. |
archived | boolean | No | Filter for tickets — true returns only archived tickets, false only live ones. Omit it to get both. |
assignedUserId | string | No | Filter for tickets — only tickets assigned to that person. |
priority | string | No | Filter for tickets — LOW, MEDIUM or HIGH. |
userId | string | No | Filter for shifts — one agent's shifts. Needs the All Shifts permission; without it you always see your own. |
shiftTypeId | string | No | Filter for shifts — only shifts of that type. |
running | boolean | No | Filter for shifts — true for shifts still clocked in (no end time), false for completed ones. |
finalized | boolean | No | Filter for shifts — locked-for-payroll state. |
edited | boolean | No | Filter for shifts — only manually corrected shifts. |
startedAfter / startedBefore | string | No | Filter for shifts — ISO timestamps bounding the shift's start time. |
email | string | No | Filter for subscribers — exact email address lookup. |
search | string | No | Filter for subscribers — case-insensitive partial match on name or email. |
state | string | No | Filter for subscribers — subscriber state (VERIFIED = mailable; also NEW, UNVERIFIED, UNSUBSCRIBED, REMOVED, BOUNCED, COMPLAINT). |
groupId | string | No | Filter for subscribers — only members of that contact group. Mutually exclusive with segmentId. |
segmentId | string | No | Filter for subscribers — only contacts matching that segment's saved filters. Mutually exclusive with groupId. |
engagementMin / engagementMax | number | No | Filter for subscribers — engagement score range. |
Available Resource Types
| Type | What It Lists |
|---|---|
widgets | Chat widgets |
chatbots | AI chatbots |
knowledgebase | Knowledge bases |
chats | Conversations |
visitors | Website visitors |
documents | Chatbot knowledge documents (requires chatbotId) |
conversation_starters | Chatbot conversation starters (requires chatbotId) |
articles | KB articles (requires knowledgebaseId) |
categories | KB categories (requires knowledgebaseId) |
documentation | Documentation portals |
doc_categories | Documentation categories (requires documentationId) |
doc_pages | Documentation pages (requires documentationId) |
contact_groups | Contact groups with subscriber counts |
contact_segments | Contact segments |
email_templates | Email templates |
campaigns | Email campaigns |
subscribers | Newsletter subscribers |
outreach | All outreach items combined (banners, messages, surveys, tours, news) |
boards | Ticket, feedback, and roadmap boards |
tickets | Tickets on a board (requires boardId) |
shifts | Work shifts with computed salary (your own; everyone's with the All Shifts permission) |
shift_types | Shift types with pay multipliers and the chat-duty flag |
Boards and Tickets
archived flag, and you can filter on it directly.Real Conversations Only
chats returns only conversations that have at least one message, exactly matching what you see in your Inbox. There's no option to include the empty records.The same reasoning applies to visitors. Listing visitors returns the people who have actually held a conversation with you, ordered by their most recent conversation. Set includeAnonymous: true when you genuinely want raw page traffic instead — that's the right choice for audience and analytics questions, and it orders by last activity.
What You Get Back
Conversations are sorted newest-updated first, and each response carries two counts:
total— how many conversations match your filters in totalreturned— how many are in this page
Every conversation record includes the visitor's name, email and country, the text of the last message, the channel it arrived through, the widget name, the email subject (for email conversations), created and updated timestamps, and the assigned agent — so you rarely need a follow-up call just to work out who a conversation is with.
Watching for New Activity
To keep an eye on your inbox without re-reading the whole list every time, remember the newest updated_at you've seen and pass it back as updatedSince on the next call. You'll only get what actually changed.
The difference is dramatic on a busy organization: a full conversation list can run to tens of thousands of records, while the same call with updatedSince set to an hour ago typically returns a handful.
How It Works
- Records are returned sorted by creation date (newest first), except conversations (last update), shifts (start time) and the types that carry their own position — knowledge base categories, documentation categories and pages, conversation starters and shift types — which come back in the order the dashboard shows them.
- The
outreachtype returns all outreach items grouped by their sub-type (banners, messages, surveys, tours, news). - Pagination is supported on conversations, visitors, tickets, shifts and subscribers using the
fromparameter. Other types simply uselimit. - If your account is limited to specific widgets, you only see conversations from those widgets — the same restriction that applies in your Inbox. Owners and admins aren't restricted, and voice calls are always visible since they don't belong to a widget.
Example Prompts
- "Show me all my widgets."
- "List my chatbots."
- "What conversations are unassigned right now?"
- "Show me any conversations that came in since 9am." (uses
updatedSince) - "Show me only my Instagram conversations." (uses
channels) - "Show me the documents in my Support Bot chatbot." (uses
list_recordsto find the chatbot first, then lists its documents) - "List all published articles in my Support knowledge base." (finds the KB, then lists articles with
publishedOnly: true) - "Show me my newsletter contact groups and how many subscribers each has."
- "Find the subscriber [email protected]." (uses
email) - "List the members of my VIP group." (finds the group, then lists with
groupId) - "Show me unsubscribed contacts." (uses
state) - "What campaigns have I sent recently?"
- "List all my outreach items — banners, surveys, tours, everything."
- "Show me my latest 100 conversations."
get_record
Fetches a single record by ID with full details. Returns more information than list_records — for example, full configuration objects, content fields, and related data.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The resource type. See available tables below. |
id | string | Yes | The unique ID of the record to fetch. |
Available Resource Types
All the same types as list_records, plus specific outreach sub-types for fetching individual items:
| Type | What You Get |
|---|---|
widgets | Full configuration, theme colors, and linked resources |
chatbots | Complete AI settings and configuration |
knowledgebase | Portal details with categories |
documentation | Portal details with categories |
doc_categories | Category details including description and publish status |
doc_pages | Full Markdown content and page hierarchy |
chats | Full conversation details, including channel and has_messages (see below) |
visitors | Complete visitor profile |
documents | Full document content |
conversation_starters | Starter label and prompt |
articles | Full HTML content |
categories | Category details and hierarchy |
campaigns | Full campaign details including email content and recipients |
subscribers | Subscriber profile with custom fields, engagement score and group memberships |
email_templates | Full template content |
banners | Content, styling, and trigger rules |
messages | Content and trigger rules |
surveys | Survey flow and trigger rules |
tours | Tour steps and trigger rules |
news | Full content, cover image, and language |
boards | Everything about a board — see below |
tickets | Full ticket details, including its labels, comments and who reported it |
shifts | Full shift details with computed salary — plus the audit trail with the All Shifts permission |
shift_types | Shift type details including pay multiplier and chat-duty flag |
banners, messages, surveys, tours, news) — not the combined outreach type that list_records uses.Two fields on conversations are worth knowing about:
has_messages— whether this is a real conversation or one of the empty records the widget opens for a new visitor. Unlikelist_records, fetching a conversation by ID returns it either way, so this tells you which you got.channel— how the conversation arrived: widget, email, Facebook, Instagram, or voice.
How It Works
- The record must belong to your organization. Attempts to access records from other organizations will fail.
- Conversations also respect per-widget access — if your account is limited to specific widgets, fetching a conversation from another widget fails the same way it would in your Inbox.
- Returns the complete details of a resource, giving you the full picture of its configuration and content.
Example Prompts
- "Show me the full details of my default widget." (lists widgets first, then gets the default one)
- "What's the AI configuration on my Support Bot?" (lists chatbots, then gets the specific one)
- "Show me the content of my refund policy document." (lists documents, then gets the full content)
- "Let me see the full HTML of my Getting Started article." (finds the article, then gets its content)
- "What are the trigger rules on my sale banner?" (lists outreach, then gets the banner details)
- "Show me the email content and recipients of my March campaign." (gets campaign with full send details)
Common Workflow Patterns
Explore Then Act
Most workflows start with Data Access tools:
- List resources to find what exists →
list_records - Inspect a specific resource to understand its state →
get_record - Modify it using the appropriate management tool →
manage_widget,manage_chatbot, etc.
Bulk Review
Use list_records with a higher limit to review many resources at once:
- "Show me all 200 of my newsletter contacts."
- "List my last 100 conversations."
Monitor for Activity
Check in on your inbox repeatedly without re-reading everything:
- List conversations once →
list_recordswithtable: "chats" - Note the newest
updated_atin the results - On the next check, pass it as
updatedSince→ only changed conversations come back
- "Check every so often whether any new conversations came in, and tell me about them."
Cross-Reference
Combine listing from different tables to understand relationships:
- "List my widgets and chatbots, then tell me which chatbot is linked to which widget."
- "Show me all knowledge bases and their article counts."