Skip to content

Run business workflows with the Agent

This page explains how to query system data in the runtime. Using a CRM scenario as the example, it demonstrates three common queries: pulling a batch of customers, viewing a single customer's details, and viewing the follow-up records and opportunities linked to a customer. In your own system, you can query orders, tickets, contracts, inventory, payments, and other data the same way.

Who this is for

Sales managers, sales reps, and implementation engineers.

Enter the runtime and query data

  1. Open the app "Your CRM Example App".
  2. Click Visit System.
  3. In the runtime, click Lovrabet AI in the left sidebar.
  4. Compare your screen with the screenshot below: there should be an input box at the bottom of the page and available Skills in the middle.

Screenshot reference: the runtime chat entry is shown below. Data queries start from the input box at the bottom.

Runtime chat entry

Query a batch of data

Paste a business question into the input box. Here is a CRM example:

The Lovrabet AI interface in a CRM system. "Lovrabet AI" appears at the top left, with the My, Skills, and Knowledge tabs below...

text
列出最近 14 天没有跟进、但还有进行中销售机会的客户。
请返回客户名称、负责人、最近跟进时间、销售机会阶段、预计金额和建议动作。

When the results come back, check three things:

  1. Can business users work with the returned fields as-is?
  2. Do the filter conditions match the current business definitions?
  3. Does each user see only the data they have permission to view?

In the CRM example, start by confirming these fields:

FieldUsed for
Customer nameIdentify which customer to act on
OwnerConfirm who follows up
Last follow-up timeCheck whether it is overdue
Opportunity stageGauge progress
Expected amountSet priority
Suggested actionDecide the next step

View a single record's details

After a batch query, click a record to open its details. In the CRM example, open a customer and check these areas:

AreaFields
Customer profileCustomer name, tier, industry, region, owner
Recent follow-upsFollow-up time, method, notes, next-step plan
Linked opportunitiesStage, amount, expected close date, risk notes
Suggested actionsNext follow-up time, suggested talking points, whether the manager should step in

For orders, tickets, contracts, and other system data, check the same way: core fields, current status, linked records, and next steps.

Keep querying related information from a record's detail page. In the CRM example, you can enter:

text
总结这个客户最近 30 天的跟进情况。
请列出当前销售机会、风险点和下一步建议,并说明依据来自哪些记录。

If the evidence the Agent cites doesn't match what the page shows, go back to App Management → Dataset Overview and verify the fields and relations against the screenshot below.

If the results look wrong

SymptomCheck
Too many resultsNarrow the time range, or add filters such as status or owner
Too few resultsCheck that dataset relations are complete and the query isn't too narrow
Field names are confusingRecalibrate field names in Dataset Overview
Detail page is missing fieldsCheck that the fields the detail page needs are recognized in the dataset
Related records are missingCheck the relation fields between datasets
Amounts shouldn't be visibleAdjust field permissions

Claude Code prompt

text
请使用 rabetbase 找到目标应用里可用于系统数据查询的数据集。
先执行 rabetbase dataset list --appcode <你的应用 appCode> --format compress。
再执行 rabetbase dataset links --appcode <你的应用 appCode> --format compress。
如果以 CRM 为示例,再分别打开客户、销售机会、跟进记录数据集详情:rabetbase dataset detail --code <datasetCode> --appcode <你的应用 appCode> --format compress。
输出可用于批量查询、单条详情和关联数据查询的数据集、字段、关联字段、筛选条件和权限注意事项。
本轮只读,不生成页面,不修改数据集。

Next steps

Continue to "3. Review execution records and save as a Skill".

基于飞书知识库同步生成,内容以飞书源文档为准