# 催收

## reminder_forecast

用帶的催收設定（不會存）預估下一次自動催收：什麼時候、幾張請款單、幾封信。

給 Agent 的原文：

> Forecast the next automatic reminder run with these settings (not saved): when, how many bills, how many emails.

| 參數 | 型別 | 必填 | 說明 |
| --- | --- | --- | --- |
| `auto_enabled` | boolean | 必填 |  |
| `first_after_days` | integer | 必填 |  |
| `interval_days` | integer | 必填 |  |

授權項目：`reminders:read`

核可：不用

## reminder_send

現在就對逾期的請款單寄催收信，同一位客戶的放在同一封；每張各自檢查。可以先試算看會催哪幾張、寄給誰。寄出前要先試算，把結果給使用者看、問過使用者，再帶試算給的確認碼寄。

給 Agent 的原文：

> Send payment reminders now for overdue bills; bills of the same customer go in one email. Each bill is checked on its
> own. Use dry_run to see which bills would be reminded and to whom. Before sending, call with dry_run: true, show the user the
> bills, amounts and recipients, and ask whether to send; then call again with the confirmation_code from the dry run.

| 參數 | 型別 | 必填 | 說明 |
| --- | --- | --- | --- |
| `bills` | string[] | 必填 | 1 to 100 overdue bill numbers (BL-000001) or ids |
| `dry_run` | boolean |  | default: false |
| `confirmation_code` | string（可以是 null） |  | Required unless dry_run is true: the confirmation_code returned by a dry run with the same parameters. |
| `idempotency_key` | string |  | Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again. |

授權項目：`reminders:send`

寫入、可試算、核可：不用、寄出前要先試算帶確認碼

## reminder_set_auto

停止或恢復一張未付請款單的自動催收

給 Agent 的原文：

> Stop (enabled: false) or resume (enabled: true) automatic reminders for one unpaid bill. Manual reminders with reminder_send
> still work while stopped. Resuming does not send anything right away; the next automatic reminder follows the workspace's
> reminder settings.

| 參數 | 型別 | 必填 | 說明 |
| --- | --- | --- | --- |
| `bill` | string | 必填 | Bill number (BL-000001) or id |
| `enabled` | boolean | 必填 | false stops automatic reminders for this bill; true resumes them |
| `idempotency_key` | string | 必填 | Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again. |

授權項目：`reminders:send`

寫入、核可：不用
