Deep Query for AI agents. Faster, cheaper answers from your business data.
Deep Query lets AI agents filter, search and aggregate records kept by StackOne Data Sync, in under a second. The agent gets only the counts and fields it needs, without a call to the source API.
Querying synced records
greenhouse_list_notes_s1query match_phrase "open to relocating to London" → 12 notes 12 candidates are open to relocating to London:
1 query · 12 of 200,000 notes · no provider API call · 349 tokens
Reading the synced employee record
sapsuccessfactors_list_users_s1query userId: mchen · 2 fields Omar Haddad, your manager, approves it. It's charged to cost center 4400.
Synced SAP SuccessFactors data · no provider API call · 19 tokens
Companies already connected through StackOne
Deep Query use cases. Get the records and totals
your task needs.
Deep Query filters and counts synced records inside StackOne and sends your agent only the result, cutting the tokens a task uses by up to 99.9%.
How many London employees are in each department?
SAP SuccessFactors users 30,000 synced employees6,900 match location: London6 department counts
{
"filter": {"term": {"location": "London"}},
"aggs": {"by_department": {"terms": {"field": "department"}}}
} 6,900 employees in London, 1,350 of them in Support.
One of 200 synced records
{
"userId": "ocole0",
"firstName": "Omar",
"lastName": "Cole",
"department": "Product",
"location": "New York",
"managerName": "Sam Nair",
"costCenter": "4430 · Product",
"jobTitle": "Product Manager"
}sapsuccessfactors_list_users_s1queryFilter London employees, count by department
{
"filter": {
"term": {
"location": "London"
}
},
"aggs": {
"by_department": {
"terms": {
"field": "department"
}
}
}
}Returned by sapsuccessfactors_list_users_s1query
[
{
"key": "Support",
"doc_count": 1350
},
{
"key": "Engineering",
"doc_count": 1200
},
{
"key": "People",
"doc_count": 1200
},
{
"key": "Finance",
"doc_count": 1050
},
{
"key": "Product",
"doc_count": 1050
},
{
"key": "Sales",
"doc_count": 1050
}
]Which engineers' probation ends in the next 30 days?
Workday workers 7,200 synced workers7 engineers finish probation by 24 Oct7 workers · 4 fields
{
"filter": {
"bool": {
"must": [
{"term": {"status": "active"}},
{"term": {"department": "Engineering"}},
{
"range": {
"probationEndDate": {"gte": "2026-09-24", "lte": "2026-10-24"}
}
}
]
}
},
"sort": [{"probationEndDate": "asc"}],
"source": ["firstName", "lastName", "jobTitle", "probationEndDate"]
} 7 engineers finish probation in the next 30 days, first Tom Cole on 29 Sept.
One of 240 synced records
{
"id": "WD-21001",
"firstName": "Ruth",
"lastName": "Ferreira",
"email": "ruth.ferreira0@example.com",
"status": "active",
"country": "US",
"department": "Finance",
"jobTitle": "Finance Manager",
"startDate": "2026-07-03",
"terminationDate": null,
"probationEndDate": "2027-01-03"
}workday_list_workers_s1queryFilter active engineers whose probation ends by 24 October, soonest first
{
"filter": {
"bool": {
"must": [
{
"term": {
"status": "active"
}
},
{
"term": {
"department": "Engineering"
}
},
{
"range": {
"probationEndDate": {
"gte": "2026-09-24",
"lte": "2026-10-24"
}
}
}
]
}
},
"sort": [
{
"probationEndDate": "asc"
}
],
"source": [
"firstName",
"lastName",
"jobTitle",
"probationEndDate"
]
}Returned by workday_list_workers_s1query
[
{
"firstName": "Tom",
"lastName": "Cole",
"jobTitle": "Staff Engineer",
"probationEndDate": "2026-09-29"
},
{
"firstName": "Leo",
"lastName": "Ferreira",
"jobTitle": "Senior Engineer",
"probationEndDate": "2026-10-02"
},
{
"firstName": "Ines",
"lastName": "Okafor",
"jobTitle": "Staff Engineer",
"probationEndDate": "2026-10-06"
},
{
"firstName": "Maya",
"lastName": "Iqbal",
"jobTitle": "Software Engineer",
"probationEndDate": "2026-10-09"
},
{
"firstName": "Zara",
"lastName": "Costa",
"jobTitle": "Staff Engineer",
"probationEndDate": "2026-10-14"
},
{
"firstName": "Felix",
"lastName": "Martin",
"jobTitle": "Staff Engineer",
"probationEndDate": "2026-10-19"
},
{
"firstName": "Tom",
"lastName": "Patel",
"jobTitle": "Software Engineer",
"probationEndDate": "2026-10-22"
}
]Which support groups have the most open refund requests this month?
Zendesk tickets 9,600 synced tickets900 open, this month, mention a refund4 group counts
{
"filter": {
"bool": {
"must": [
{"term": {"status": "open"}},
{"range": {"createdAt": {"gte": "2026-09-01"}}},
{"match": {"description": "refund"}}
]
}
},
"aggs": {"by_group": {"terms": {"field": "group"}}}
} 900 open tickets mention a refund this month, 420 of them in Billing.
One of 320 synced records
{
"id": 480000,
"subject": "The customer is asking for a",
"description": "The customer is asking for a refund on their last order. Export to CSV fails with a timeout.",
"status": "open",
"group": "Shipping",
"priority": "high",
"requester": "Jordan Novak",
"createdAt": "2026-09-01"
}zendesk_list_tickets_s1querySearch descriptions for refund, filter open tickets this month, count by group
{
"filter": {
"bool": {
"must": [
{
"term": {
"status": "open"
}
},
{
"range": {
"createdAt": {
"gte": "2026-09-01"
}
}
},
{
"match": {
"description": "refund"
}
}
]
}
},
"aggs": {
"by_group": {
"terms": {
"field": "group"
}
}
}
}Returned by zendesk_list_tickets_s1query
[
{
"key": "Billing",
"doc_count": 420
},
{
"key": "Shipping",
"doc_count": 270
},
{
"key": "Accounts",
"doc_count": 150
},
{
"key": "Technical",
"doc_count": 60
}
]Which backend hires had concerns about their system design interview?
Ashby interview feedback 1,200 synced feedback forms8 hires with the phrase in their notes8 candidates · 4 fields
{
"filter": {
"bool": {
"must": [
{"match_phrase": {"notes": "concerns about system design"}},
{"terms": {"recommendation": ["Hire", "Strong Hire"]}},
{"range": {"submittedAt": {"gte": "2026-07-01"}}}
]
}
},
"sort": [{"submittedAt": "desc"}],
"source": ["candidateName", "role", "recommendation", "submittedAt"]
} 8 candidates recommended for hire this quarter had system design concerns noted, most recently Ruth Shah.
One of 300 synced records
{
"id": "fb_07001",
"candidateName": "Kofi Reed",
"role": "Staff Engineer",
"recommendation": "Hire",
"notes": "Excellent system design interview: walked through sharding, queues and backpressure without prompting.",
"interviewer": "Zara Brun",
"submittedAt": "2026-08-27"
}ashby_list_application_feedback_s1queryMatch the phrase in interview notes, filter hire recommendations this quarter
{
"filter": {
"bool": {
"must": [
{
"match_phrase": {
"notes": "concerns about system design"
}
},
{
"terms": {
"recommendation": [
"Hire",
"Strong Hire"
]
}
},
{
"range": {
"submittedAt": {
"gte": "2026-07-01"
}
}
}
]
}
},
"sort": [
{
"submittedAt": "desc"
}
],
"source": [
"candidateName",
"role",
"recommendation",
"submittedAt"
]
}Returned by ashby_list_application_feedback_s1query
[
{
"candidateName": "Ruth Shah",
"role": "Senior Backend Engineer",
"recommendation": "Hire",
"submittedAt": "2026-09-14"
},
{
"candidateName": "Tom Cole",
"role": "Senior Backend Engineer",
"recommendation": "Hire",
"submittedAt": "2026-08-24"
},
{
"candidateName": "Ana Haddad",
"role": "Senior Backend Engineer",
"recommendation": "Strong Hire",
"submittedAt": "2026-08-22"
},
{
"candidateName": "Omar Chen",
"role": "Senior Backend Engineer",
"recommendation": "Strong Hire",
"submittedAt": "2026-08-15"
},
{
"candidateName": "Eli Patel",
"role": "Senior Backend Engineer",
"recommendation": "Hire",
"submittedAt": "2026-08-15"
},
{
"candidateName": "Felix Costa",
"role": "Senior Backend Engineer",
"recommendation": "Strong Hire",
"submittedAt": "2026-08-01"
},
{
"candidateName": "Omar Mensah",
"role": "Senior Backend Engineer",
"recommendation": "Hire",
"submittedAt": "2026-07-08"
},
{
"candidateName": "Leo Ferreira",
"role": "Senior Backend Engineer",
"recommendation": "Hire",
"submittedAt": "2026-07-01"
}
]Which candidates told us they're open to relocating to London?
Greenhouse candidate notes 200,000 synced notes12 notes with the phrase12 candidates · 4 fields
{
"filter": {
"bool": {
"must": [
{"match_phrase": {"body": "open to relocating to London"}},
{"range": {"createdAt": {"gte": "2025-09-24"}}}
]
}
},
"sort": [{"createdAt": "desc"}],
"source": ["candidateName", "jobTitle", "author", "createdAt"]
} 12 candidates said they're open to relocating to London, most recently Priya Mensah for Data Engineer.
One of 250 synced records
{
"id": "nt_088001",
"candidateId": "cand_040011",
"candidateName": "Nadia Okafor",
"jobTitle": "Product Designer",
"author": "Alex Costa",
"body": "Catch-up after the take-home review. Panel feedback was positive overall, with a few open questions about testing strategy that the hiring manager wants to cover in the final round. Wants to understand the team's roadmap before the next round. Flagged to the hiring manager as a strong match. Will chase references this week and share availability for the final round by Friday.",
"createdAt": "2026-08-16"
}greenhouse_list_notes_s1queryMatch the phrase in a year of notes, newest first
{
"filter": {
"bool": {
"must": [
{
"match_phrase": {
"body": "open to relocating to London"
}
},
{
"range": {
"createdAt": {
"gte": "2025-09-24"
}
}
}
]
}
},
"sort": [
{
"createdAt": "desc"
}
],
"source": [
"candidateName",
"jobTitle",
"author",
"createdAt"
]
}Returned by greenhouse_list_notes_s1query
[
{
"candidateName": "Priya Mensah",
"jobTitle": "Data Engineer",
"author": "Ana Walsh",
"createdAt": "2026-09-20"
},
{
"candidateName": "Mei Cole",
"jobTitle": "Product Designer",
"author": "Ben Cole",
"createdAt": "2026-09-15"
},
{
"candidateName": "Omar Shah",
"jobTitle": "Staff Engineer",
"author": "Lena Nair",
"createdAt": "2026-08-14"
},
{
"candidateName": "Avery Shah",
"jobTitle": "Staff Engineer",
"author": "Priya Walsh",
"createdAt": "2026-07-08"
},
{
"candidateName": "Oscar Morgan",
"jobTitle": "Data Engineer",
"author": "Zara Walsh",
"createdAt": "2026-05-16"
},
{
"candidateName": "Nadia Martin",
"jobTitle": "Product Designer",
"author": "Jordan Iqbal",
"createdAt": "2026-05-10"
},
{
"candidateName": "Eli Martin",
"jobTitle": "Senior Backend Engineer",
"author": "Alex Ferreira",
"createdAt": "2026-03-31"
},
{
"candidateName": "Zara Costa",
"jobTitle": "Account Executive",
"author": "Sam Lund",
"createdAt": "2026-02-28"
},
{
"candidateName": "Omar Brun",
"jobTitle": "Account Executive",
"author": "Lena Carter",
"createdAt": "2026-01-10"
},
{
"candidateName": "Eli Brun",
"jobTitle": "Staff Engineer",
"author": "Theo Ferreira",
"createdAt": "2025-12-04"
},
{
"candidateName": "Ines Mensah",
"jobTitle": "Account Executive",
"author": "Alex Haddad",
"createdAt": "2025-11-26"
},
{
"candidateName": "Avery Morgan",
"jobTitle": "Product Designer",
"author": "Theo Lund",
"createdAt": "2025-10-11"
}
]Where are we slowest to backfill this year's leavers?
Workday workers 7,200 synced workers660 left in 20266 leaver counts
Oracle requisitions 800 synced requisitions130 are open5 open-requisition counts
{
"filter": {
"bool": {
"must": [
{"term": {"status": "terminated"}},
{"range": {"terminationDate": {"gte": "2026-01-01"}}}
]
}
},
"aggs": {"by_department": {"terms": {"field": "department"}}}
} {
"filter": {"term": {"status": "Open"}},
"aggs": {"by_department": {"terms": {"field": "department"}}}
} Support has the biggest gap: 210 leavers and 10 open roles.
One of 240 synced records
{
"id": "WD-21001",
"firstName": "Ruth",
"lastName": "Ferreira",
"email": "ruth.ferreira0@example.com",
"status": "active",
"country": "US",
"department": "Finance",
"jobTitle": "Finance Manager",
"startDate": "2026-07-03",
"terminationDate": null,
"probationEndDate": "2027-01-03"
}One of 80 synced records
{
"id": "REQ-3101",
"title": "Account Executive",
"department": "Sales",
"status": "Filled",
"location": "Berlin",
"hiringManager": "Omar Cole",
"openedDate": "2026-08-17"
}workday_list_workers_s1queryFilter leavers since 1 January, count by department
{
"filter": {
"bool": {
"must": [
{
"term": {
"status": "terminated"
}
},
{
"range": {
"terminationDate": {
"gte": "2026-01-01"
}
}
}
]
}
},
"aggs": {
"by_department": {
"terms": {
"field": "department"
}
}
}
}oraclehcm_list_recruiting_job_requisitions_s1queryFilter open requisitions, count by department
{
"filter": {
"term": {
"status": "Open"
}
},
"aggs": {
"by_department": {
"terms": {
"field": "department"
}
}
}
}Returned by workday_list_workers_s1query
[
{
"key": "Support",
"doc_count": 210
},
{
"key": "Engineering",
"doc_count": 180
},
{
"key": "Sales",
"doc_count": 150
},
{
"key": "Product",
"doc_count": 60
},
{
"key": "Finance",
"doc_count": 30
},
{
"key": "People",
"doc_count": 30
}
]Returned by oraclehcm_list_recruiting_job_requisitions_s1query
[
{
"key": "Engineering",
"doc_count": 50
},
{
"key": "Sales",
"doc_count": 40
},
{
"key": "Product",
"doc_count": 20
},
{
"key": "People",
"doc_count": 10
},
{
"key": "Support",
"doc_count": 10
}
]Find that are , then by
Salesforce opportunities 48,000 synced opportunities7,950 match open, in EMEA4 totals by stage
{
"filter": {
"bool": {
"must": [{"term": {"isClosed": false}}, {"term": {"region": "EMEA"}}]
}
},
"aggs": {
"by_stage": {
"terms": {"field": "stage"},
"aggs": {"total": {"sum": {"field": "amount"}}}
}
}
} $1,032M across 7,950 opportunities, the most in Negotiation ($372.8M).
One of 48,000 synced records
{
"id": "006004101",
"name": "Wide World Importers renewal",
"accountName": "Wide World Importers",
"stage": "Closed Won",
"isClosed": true,
"amount": 215000,
"closeDate": "2026-09-10",
"ownerName": "Oscar Morgan",
"region": "North America"
}salesforce_list_opportunities_s1queryBuilt from your choices
{
"filter": {
"bool": {
"must": [
{
"term": {
"isClosed": false
}
},
{
"term": {
"region": "EMEA"
}
}
]
}
},
"aggs": {
"by_stage": {
"terms": {
"field": "stage"
},
"aggs": {
"total": {
"sum": {
"field": "amount"
}
}
}
}
}
}Returned by salesforce_list_opportunities_s1query
[
{
"key": "Negotiation",
"doc_count": 2100,
"total": {
"value": 372750000
}
},
{
"key": "Prospecting",
"doc_count": 2400,
"total": {
"value": 270000000
}
},
{
"key": "Qualification",
"doc_count": 2100,
"total": {
"value": 231000000
}
},
{
"key": "Proposal",
"doc_count": 1350,
"total": {
"value": 158250000
}
}
]Cross-system queries. Join records across systems
in one query.
Data Sync keeps records from your HR, recruiting, sales, IT and finance systems in StackOne. Your agent sees every field it can query and joins records across systems, so questions that needed an export and a spreadsheet take one call.
-
departmentstartDatestatus
-
requisitiondepartmentstatus
-
skillsdayRatedateAvailable
-
managercostCenteruserId
-
stageamountownerName
Your synced data
FilterSearchAggregateJoin
-
HR
Which teams lost more people than they hired this year?
-
Sales
Which open deals belong to reps who are leaving?
-
Recruiting
Which past finalists fit our open Java roles?
-
IT
Who approves access for next week's new starters?
-
Finance
What does each cost center spend on contractors?
Faster tool responses. Read synced data
without waiting on the source API.
Deep Query reads records already stored in StackOne, so your agent gets an answer even while a provider's API is slow or rate-limited.
A live lookup waits 3 to 5 seconds for the provider API to answer. Deep Query reads the synced records in about 0.2 seconds.
Configure Data Sync. Set how often Data Sync
refreshes your records.
Choose which actions to sync and set a schedule for each one. Deep Query reads those stored records, so the schedule sets how fresh its results are.
Follow the Data Sync setup guide01Pick an actionOpen a Connector Profile and find a list action that supports sync.
WorkdayProfile · HR agent
ActionType
List WorkersRead
Get WorkerRead
List OrganizationsRead
Update WorkerWrite
02Enable Data SyncSelect the sync icon and switch Data Sync on for that action.
Data Sync· List WorkersOptimize
Setup
Enable Data Sync
Preferences
03Set the scheduleChoose how often new and changed records sync, and how often a full re-sync runs.
Data Sync· List WorkersOptimize
Setup
Enable Data Sync
Preferences
04SaveSave the profile to start syncing.
Data Sync· List WorkersOptimize
Setup
Enable Data Sync
Preferences
05StackOne syncsStackOne pages through the provider API on your schedule and keeps the records current.
- Full sync12,000 records
- Incremental38 changed
- Incremental12 changed
06Your agent queriesThe action's query tool is ready over MCP to filter, search and aggregate.
How many active employees are in each UK department?
workday_list_workers_s1query1 query
filter: status active, country UK aggs: terms department
3,600 active employees in the UK, 1,200 of them in Engineering.
Sync any list action, including your own.
An action declares Data Sync in its connector's YAML before anyone can turn it on. StackOne's connectors declare it for common records. In your own connector, you choose. Edit the block to see how it changes each sync run and the tool your agent gets.
Valid. The action offers Data Sync.
In the Connector Profile1
Data Sync can't be turned on while allowed is false.
Sync run2
- GET/workers?updated_after=2026-09-24T09:00:00Z100 · next=c_8f2a
- GET/workers?next=c_8f2a&updated_after=2026-09-24T09:00:00Z100 · next=c_90bd
- GET/workers?next=c_90bd&updated_after=2026-09-24T09:00:00Z37 · no next
- Done in 3 requests. Unchanged workers stay as they were.
What your agent gets3
workday_list_workers_s1query Filter, search, sort and count synced Workday workers, in about 0.2 seconds.
departmentstatuscountryjobTitlestartDateprobationEndDate
filtermatchsortaggssource
No query tool. The agent can only page through the live Workday API.
Deep Query syntax. Filter, search and count
on any synced field.
Query tools take OpenSearch-style queries. Your agent looks up each synced field and its type first, then filters, searches and aggregates on it.
Filter
Search text
Aggregate
Shape the result
Deep Query FAQ. How Deep Query works
with your AI agent.
Get started with Deep Query.
Turn on Data Sync for a supported action and your agent gets its query tools over MCP.