Skip to content

Advanced: integrate legacy pages, APIs, and code logic

This page applies after the CRM database is connected and the runtime is up and running.

When to move to advanced integration

SignalApproach
Legacy pages are still in useIntegrate the legacy pages or use micro-frontends
The legacy system has stable APIsIntegrate the legacy APIs
Complex business rules live in the legacy codeWrap them as Backend Functions or BFF
The legacy process relies on manual workUse RPA
An external SaaS offers standard capabilitiesUse MCP or SaaS Connectors

Integrate legacy pages

  1. Confirm the legacy page URLs.
  2. Confirm how users sign in.
  3. Confirm which parameters each page accepts, such as customer ID or opportunity ID.
  4. Add entries on the CRM detail pages.
  5. Click a legacy page entry from a customer detail page.
  6. Check that the correct customer or opportunity opens.

Screenshot reference: the App Management entry is shown below. After integrating legacy pages, legacy APIs, and code logic, come back here to verify the app.

App Management entry

Integrate legacy APIs

  1. List the legacy APIs.
  2. Record each API's inputs, outputs, and permissions.
  3. Start with a low-risk API, such as querying customer contracts.
  4. Wrap it as a BFF or Backend Function.
  5. Reference it by name in the Skill.
  6. Verify with the runtime CLI.
bash
lovrabet bff exec --name legacy_contract_lookup --params '{"customerId":"demo"}'

Integrate legacy code logic

  1. Find the rules in the legacy code that actually drive business results.

  2. Write each rule as input, processing, output.

  3. Decide where each one goes:

    • Queries and aggregation go to SQL.
    • Multi-step orchestration goes to BFF.
    • Write-back, approvals, and status transitions go to Backend Functions.
  4. Publish, then add it to a Skill.

  5. Verify the result with a sample CRM record.

Integrate RPA, MCP, and external SaaS

  1. Record the external system name.
  2. Record the authentication method.
  3. Record the available actions.
  4. Record the inputs and outputs.
  5. Add them as fixed steps in the Skill.
  6. Add preview and confirmation whenever write-back is involved.

Completion checklist

  • Legacy pages can be opened from CRM contexts.
  • Legacy APIs return a fixed structure.
  • Legacy code rules are wrapped as stable capabilities.
  • The call order is visible in the Skill.
  • Write-back actions have permissions, preview, and logs.

Claude Code prompt

text
请使用 rabetbase 为目标应用做旧系统接入盘点。
先执行:
1. rabetbase dataset list --appcode <你的应用 appCode> --format compress
2. rabetbase dataset links --appcode <你的应用 appCode> --format compress
3. rabetbase sql list --appcode <你的应用 appCode> --format compress
4. rabetbase bff list --appcode <你的应用 appCode> --format compress
输出旧页面、旧 API、旧 SQL、旧代码规则分别适合落到页面入口、SQL、BFF、Backend Function 还是 Skill。
涉及写回或状态流转的能力,列为 Backend Function。
本轮只读,只输出接入清单。

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