Skip to content
5 changes: 5 additions & 0 deletions .changeset/2029-rep-discussion-scheduled-work-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hotcrm': patch
---

Sales reps, managers, marketers and service agents can now read the comments and the activity timeline on the records they can open, post comments there and edit their own (deleting a comment stays with administrators until a platform fix lands). Before, the Discussion panel refused them both halves with "You don't have permission to view comments on this record". The Quotes and Contracts pages now say that the nightly quote and contract expiry and the daily renewal reminder run only on a deployment that has switched scheduled work on, and what a default install does instead. The Automation page's email-template section now describes the notification templates the app ships instead of saying it has none. The in-product guides (Sales, Service, Administration and the overview) now give the same condition for every sweep they name, with the times unchanged.
6 changes: 4 additions & 2 deletions content/docs/administration/automation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,14 @@ Understanding this order helps debug *"why didn't my flow fire?"* questions.

Most automation actions send email. Templates live in **Studio → Integration → Email Templates** and support:

- **Merge fields** — `{{path.to.value}}` placeholders, rendered against the `data` payload passed on that send. Spell every segment the way HotCRM spells it — objects are `crm_opportunity` and `crm_contact`, fields are `name`, `owner_id`, `email` — never Salesforce-style `Opportunity.Name`. What the path is rooted at depends on the payload shape the sender passes, and this app ships no `sendTemplate()` caller to copy one from, so declare the names your template reads in its `variables` list and agree the shape with whoever sends the mail.
- **Merge fields** — `{{path.to.value}}` placeholders, rendered against the `data` payload passed on that send. Spell every segment the way HotCRM spells it — objects are `crm_opportunity` and `crm_contact`, fields are `name`, `owner_id`, `email` — never Salesforce-style `Opportunity.Name`. What the path is rooted at depends on the payload shape the sender passes. HotCRM's own notification templates (below) are the shape to copy: each reads flat holes such as `{{name}}` or `{{contract_number}}`, filled from the values the flow's `notify` node passes with it. Declare the names your template reads in its `variables` list and agree the shape with whoever sends the mail.
- **Conditional blocks** — show only if a condition is true.
- **HTML + plain text** versions.
- **Attachments** — quote PDFs, contract PDFs.

HotCRM itself ships no email templates: nothing under `src/` authors one, and the compiled app carries no email-template metadata at all. The lead-routing, opportunity-win, case and renewal notifications this app sends come from the **`notify` nodes** in the flows listed above — each one's subject and body text is written inline in its own flow, so that is where you change the wording. Contract activation sends nothing: it runs as an object hook (`src/revenue/objects/contract.hook.ts`) with no notification step, and the contract mail that does go out comes from the **Contract Auto-Expiration** and **Contract Renewal Reminder** flows. Author a template in **Studio → Integration → Email Templates** when you need a templated outbound email of your own.
HotCRM ships an email template for each of its own **automatic notifications**, the alerts its flows send to your colleagues (never to customers): an approval decision on an account, a lead conversion or a large deal; a newly routed or converted lead; a new contact to welcome; a stalled deal or a large one won; a task reminder or an urgent task; a new quote; a contract that has expired or is due for renewal; a case that was escalated or missed its SLA. Each template comes in English, Simplified Chinese, Japanese and Spanish, and every recipient gets the copy in their own language, or in English when the app has none for it. They are records of the platform's email-template object, alongside the platform's own authentication mail (invitations, password resets).

Each **`notify` node** in the flows listed above names its template and passes the values the template's holes read, so the subject and body text live in the template, not in the flow: to change the wording, change the template. In the source the templates live in an `email-templates/` folder in each package whose flows send them (`src/sales/`, `src/service/` and `src/revenue/`), one file per language. The alerts that come from scheduled flows go out only where the deployment has switched scheduled work on (see [Scheduled automation](#scheduled-automation)). Contract activation sends nothing: it runs as an object hook (`src/revenue/objects/contract.hook.ts`) with no notification step, and the contract mail that does go out comes from the **Contract Auto-Expiration** and **Contract Renewal Reminder** flows. Author a template in **Studio → Integration → Email Templates** when you need a templated outbound email of your own.

## Where to monitor automation

Expand Down
8 changes: 5 additions & 3 deletions content/docs/administration/automation.zh-Hans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ description: 验证规则、流程、计划作业与审批 —— 无需你动

如果你需要构建新的流程,请参见 [定制化 › 扩展对象](/zh-Hans/docs/customization/extending-objects)。

## 计划类自动化
## 计划类自动化 [#scheduled-automation]

基于时间的自动化以 **计划类流程** 实现 —— 即起始节点带 cron 计划的流程。上表中八个 `计划` 行就是全部;不存在另一套需要另找的「计划作业」元数据。它们通过 job 服务运行,因此 `triggers` 能力需与 `job` 搭配(两者都在默认能力集中)。

Expand Down Expand Up @@ -131,12 +131,14 @@ HotCRM 内置的 **商机审批** 流程串联两个 approval 节点实现分级

大多数自动化操作会发送电子邮件。模板位于 **Studio → 集成 → 邮件模板**(中文界面里这两级显示为 *集成 → 邮件模板*),并支持:

- **合并字段** —— `{{path.to.value}}` 占位符,按每次发送传入的 `data` 载荷渲染。路径的每一段都写 HotCRM 自己的拼写 —— 对象是 `crm_opportunity`、`crm_contact`,字段是 `name`、`owner_id`、`email` —— 而不是 Salesforce 式的 `Opportunity.Name`。路径从哪一层写起,取决于发送方传入的载荷形状;本应用没有任何 `sendTemplate()` 调用方可供照抄,所以请把模板要读的名字声明在它的 `variables` 列表里,并与发送方约定好载荷形状。
- **合并字段** —— `{{path.to.value}}` 占位符,按每次发送传入的 `data` 载荷渲染。路径的每一段都写 HotCRM 自己的拼写 —— 对象是 `crm_opportunity`、`crm_contact`,字段是 `name`、`owner_id`、`email` —— 而不是 Salesforce 式的 `Opportunity.Name`。路径从哪一层写起,取决于发送方传入的载荷形状。可以照抄的是 HotCRM 自己的通知模板(见下文):每个模板读的都是 `{{name}}`、`{{contract_number}}` 这样的扁平占位符,由流程里的 `notify` 节点随模板一起传入的取值填充。请把模板要读的名字声明在它的 `variables` 列表里,并与发送方约定好载荷形状。
- **条件块** —— 仅在条件为真时显示。
- **HTML + 纯文本** 版本。
- **附件** —— 报价 PDF、合同 PDF。

HotCRM 自身不发布任何邮件模板:`src/` 下没有编写任何一条,编译产物里也不含邮件模板元数据。潜在客户路由、商机赢单、工单处理与续约提醒的通知,都由上表那些流程里的 **`notify` 节点** 发出 —— 标题与正文直接写在各自的流程里,要改措辞就去改那里。合同激活不发任何通知:它由对象钩子(`src/revenue/objects/contract.hook.ts`)执行,链路上没有通知步骤;真正发出的合同邮件来自 **合同自动到期** 与 **合同续约提醒** 两条流程。需要自己发模板化外发邮件时,再到 **Studio → 集成 → 邮件模板** 里新建模板。
HotCRM 为自己的每一条**自动通知**都随附了一个邮件模板,也就是各个流程发给你同事(从不发给客户)的提醒:客户、线索转换或大额商机的审批结果;新分配或已转换的线索;需要问候的新联系人;停滞的商机或赢下的大额商机;任务提醒或紧急任务;新建的报价;合同到期或即将续约;被升级或超出 SLA 的工单。每个模板都有英文、简体中文、日文与西班牙文四个版本,每位收件人收到的是自己语言的版本,本应用没有该语言时则收到英文版。这些模板是平台邮件模板对象中的记录,与平台自己的认证类邮件(邀请、密码重置)放在一起。

上表那些流程里的每个 **`notify` 节点** 都点名自己的模板,并传入模板占位符要读的取值,所以标题与正文写在模板里,而不在流程里:要改措辞,就去改模板。在源码中,模板位于发送它们的流程所在的每个包下的 `email-templates/` 文件夹(`src/sales/`、`src/service/` 与 `src/revenue/`),每种语言一个文件。来自计划类流程的提醒,只有部署方开启了计划类工作时才会发出(见[计划类自动化](#scheduled-automation))。合同激活不发任何通知:它由对象钩子(`src/revenue/objects/contract.hook.ts`)执行,链路上没有通知步骤;真正发出的合同邮件来自 **合同自动到期** 与 **合同续约提醒** 两条流程。需要自己发模板化外发邮件时,再到 **Studio → 集成 → 邮件模板** 里新建模板。

## 在哪里监控自动化

Expand Down
8 changes: 5 additions & 3 deletions content/docs/administration/automation.zh-Hant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ description: 驗證規則、流程、排程作業與審批 —— 無需你動

如果你需要建構新的流程,請參見 [客製化 › 擴展物件](/zh-Hant/docs/customization/extending-objects)。

## 排程類自動化
## 排程類自動化 [#scheduled-automation]

基於時間的自動化以 **排程類流程** 實作 —— 即起始節點帶 cron 排程的流程。上表中八個 `排程` 行就是全部;不存在另一套需要另找的「排程作業」中繼資料。它們透過 job 服務執行,因此 `triggers` 能力需與 `job` 搭配(兩者都在預設能力集中)。

Expand Down Expand Up @@ -133,12 +133,14 @@ HotCRM 內建的 **商機審批** 流程串聯兩個 approval 節點實作分級

大多數自動化操作會傳送電子郵件。範本位於 **Studio → Integration → Email Templates**,並支援:

- **合併欄位** —— `{{path.to.value}}` 佔位符,依每次傳送傳入的 `data` 酬載渲染。路徑的每一段都寫 HotCRM 自己的拼寫 —— 物件是 `crm_opportunity`、`crm_contact`,欄位是 `name`、`owner_id`、`email` —— 而不是 Salesforce 式的 `Opportunity.Name`。路徑從哪一層寫起,取決於傳送方傳入的酬載形狀;本應用沒有任何 `sendTemplate()` 呼叫方可供照抄,因此請把範本要讀取的名稱宣告在它的 `variables` 清單裡,並與傳送方約定好酬載形狀。
- **合併欄位** —— `{{path.to.value}}` 佔位符,依每次傳送傳入的 `data` 酬載渲染。路徑的每一段都寫 HotCRM 自己的拼寫 —— 物件是 `crm_opportunity`、`crm_contact`,欄位是 `name`、`owner_id`、`email` —— 而不是 Salesforce 式的 `Opportunity.Name`。路徑從哪一層寫起,取決於傳送方傳入的酬載形狀。可以照抄的是 HotCRM 自己的通知範本(見下文):每個範本讀取的都是 `{{name}}`、`{{contract_number}}` 這樣的扁平佔位符,由流程裡的 `notify` 節點隨範本一起傳入的取值填入。請把範本要讀取的名稱宣告在它的 `variables` 清單裡,並與傳送方約定好酬載形狀。
- **條件區塊** —— 僅在條件為真時顯示。
- **HTML + 純文字** 版本。
- **附件** —— 報價 PDF、合約 PDF。

HotCRM 自身不發布任何郵件範本:`src/` 下沒有撰寫任何一條,編譯產物裡也不含郵件範本中繼資料。潛在客戶路由、商機贏單、工單處理與續約提醒的通知,都由上表那些流程裡的 **`notify` 節點** 發出 —— 標題與內文直接寫在各自的流程裡,要改措辭就去改那裡。合約啟用不發任何通知:它由物件鉤子(`src/revenue/objects/contract.hook.ts`)執行,鏈路上沒有通知步驟;真正發出的合約郵件來自 **合約自動到期** 與 **合約續約提醒** 兩條流程。需要自行發送範本化外寄郵件時,再到 **Studio → Integration → Email Templates** 裡新建範本。
HotCRM 為自己的每一則**自動通知**都隨附了一個郵件範本,也就是各個流程發給你同事(從不發給客戶)的提醒:客戶、潛在客戶轉換或大額商機的審批結果;新分派或已轉換的潛在客戶;需要問候的新聯絡人;停滯的商機或贏下的大額商機;任務提醒或緊急任務;新建的報價;合約到期或即將續約;被升級或超出 SLA 的工單。每個範本都有英文、簡體中文、日文與西班牙文四個版本,每位收件人收到的是自己語言的版本,本應用沒有該語言時則收到英文版。這些範本是平台郵件範本物件中的記錄,與平台自己的認證類郵件(邀請、密碼重設)放在一起。

上表那些流程裡的每個 **`notify` 節點** 都指名自己的範本,並傳入範本佔位符要讀取的取值,所以標題與內文寫在範本裡,而不在流程裡:要改措辭,就去改範本。在原始碼中,範本位於傳送它們的流程所在的每個套件下的 `email-templates/` 資料夾(`src/sales/`、`src/service/` 與 `src/revenue/`),每種語言一個檔案。來自排程類流程的提醒,只有部署方開啟了排程類工作時才會寄出(見[排程類自動化](#scheduled-automation))。合約啟用不發任何通知:它由物件鉤子(`src/revenue/objects/contract.hook.ts`)執行,鏈路上沒有通知步驟;真正發出的合約郵件來自 **合約自動到期** 與 **合約續約提醒** 兩條流程。需要自行發送範本化外寄郵件時,再到 **Studio → Integration → Email Templates** 裡新建範本。

## 在哪裡監控自動化

Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/email-and-calendar.zh-Hans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ HotCRM 把客户沟通变成**可查询的记录**:你从联系人发出的一

这些 HotCRM 今天一样都没有:没有可供销售代表挑选的模板,上文的**发送邮件**发出的就是你输入的主题与正文。

本应用**确实**随附的,是它自己的**自动通知**的文案,也就是各个流程发给你同事(从不发给客户)的提醒。每一条的主题与正文都取自本应用编写的一个邮件模板:客户、线索转换或大额商机的审批结果;新分配或已转换的线索;需要问候的新联系人;停滞的商机或赢下的大额商机;任务提醒或紧急任务;新建的报价;合同到期或即将续约;被升级或超出 SLA 的工单。每个模板都有英文、简体中文、日文与西班牙文四个版本,每位收件人收到的是自己语言的版本,本应用没有该语言时则收到英文版。提醒会进入收件人的应用内收件箱,其中大多数还会经由与**发送邮件**相同的平台邮件服务发出邮件。任务提醒、商机停滞、合同到期与续约、超出 SLA 这几类提醒来自计划类流程,只有部署方开启了计划类工作时才会运行;参见[自动化](/zh-Hans/docs/administration/automation)中的「计划类自动化」一节。
本应用**确实**随附的,是它自己的**自动通知**的文案,也就是各个流程发给你同事(从不发给客户)的提醒。每一条的主题与正文都取自本应用编写的一个邮件模板:客户、线索转换或大额商机的审批结果;新分配或已转换的线索;需要问候的新联系人;停滞的商机或赢下的大额商机;任务提醒或紧急任务;新建的报价;合同到期或即将续约;被升级或超出 SLA 的工单。每个模板都有英文、简体中文、日文与西班牙文四个版本,每位收件人收到的是自己语言的版本,本应用没有该语言时则收到英文版。提醒会进入收件人的应用内收件箱,其中大多数还会经由与**发送邮件**相同的平台邮件服务发出邮件。任务提醒、商机停滞、合同到期与续约、超出 SLA 这几类提醒来自计划类流程,只有部署方开启了计划类工作时才会运行;参见[自动化](/zh-Hans/docs/administration/automation#scheduled-automation)中的「计划类自动化」一节。

这些模板是平台邮件模板对象中的记录,与平台自己的认证类邮件(邀请、密码重置)放在一起。在源码中,它们位于发送它们的流程所在的每个包下的 `email-templates/` 文件夹(`src/sales/`、`src/service/` 与 `src/revenue/`),每种语言一个文件。

Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/email-and-calendar.zh-Hant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ HotCRM 把客戶溝通變成**可查詢的記錄**:你從聯絡人寄出的一

這些 HotCRM 今天一樣都沒有:沒有可供業務代表挑選的範本,上文的**傳送郵件**送出的就是你輸入的主旨與內文。

本應用**確實**隨附的,是它自己的**自動通知**的文案,也就是各個流程發給你同事(從不發給客戶)的提醒。每一則的主旨與內文都取自本應用撰寫的一個郵件範本:客戶、潛在客戶轉換或大額商機的審批結果;新分派或已轉換的潛在客戶;需要問候的新聯絡人;停滯的商機或贏下的大額商機;任務提醒或緊急任務;新建的報價;合約到期或即將續約;被升級或超出 SLA 的工單。每個範本都有英文、簡體中文、日文與西班牙文四個版本,每位收件人收到的是自己語言的版本,本應用沒有該語言時則收到英文版。提醒會進入收件人的應用內收件匣,其中大多數還會經由與**傳送郵件**相同的平台郵件服務寄出郵件。任務提醒、商機停滯、合約到期與續約、超出 SLA 這幾類提醒來自排程類流程,只有部署方開啟了排程類工作時才會執行;參見[自動化](/zh-Hant/docs/administration/automation)中的「排程類自動化」一節。
本應用**確實**隨附的,是它自己的**自動通知**的文案,也就是各個流程發給你同事(從不發給客戶)的提醒。每一則的主旨與內文都取自本應用撰寫的一個郵件範本:客戶、潛在客戶轉換或大額商機的審批結果;新分派或已轉換的潛在客戶;需要問候的新聯絡人;停滯的商機或贏下的大額商機;任務提醒或緊急任務;新建的報價;合約到期或即將續約;被升級或超出 SLA 的工單。每個範本都有英文、簡體中文、日文與西班牙文四個版本,每位收件人收到的是自己語言的版本,本應用沒有該語言時則收到英文版。提醒會進入收件人的應用內收件匣,其中大多數還會經由與**傳送郵件**相同的平台郵件服務寄出郵件。任務提醒、商機停滯、合約到期與續約、超出 SLA 這幾類提醒來自排程類流程,只有部署方開啟了排程類工作時才會執行;參見[自動化](/zh-Hant/docs/administration/automation#scheduled-automation)中的「排程類自動化」一節。

這些範本是平台郵件範本物件中的記錄,與平台自己的認證類郵件(邀請、密碼重設)放在一起。在原始碼中,它們位於傳送它們的流程所在的每個套件下的 `email-templates/` 資料夾(`src/sales/`、`src/service/` 與 `src/revenue/`),每種語言一個檔案。

Expand Down
Loading
Loading