Skip to content

Survey Taken 关联 Case

1. 在 Survey Taken 对象新加一个 Case 字段,lookup 到 Case。

2. 创建 Survey。

在 Charket 中创建一个 Survey, 并设置一个 Url Parameter(如 caseId)给一个被 Hidden 的 Survey Question。1.png

保存后,Survey 的链接如下:

2.png

3. 创建模板消息

在 Charket 中新建一个模板,merge 的对象为 Case。

新建模版消息2.png

其中,URL 为创建的 Survey 的链接, 并将 {!Case.Id} 赋值给该 Survey 的 Question 设置的 Url Parameter。

4. 创建 Process Builder,当关闭一个 Case 后,发送模板消息给 Contact。

登录 Salesforce,点击 Setup | Process Builder,新建 Process Builder,选择  Object 为 Case,保存后在 Define Criteria for this Action Group 中的配置如图:

4.png

在 Call Apex 页面设置如下图所示:

5.png

其中:Apex Class 为 Send a WeChat Notification

Set Apex Variables 设置如下:

Current Object ID 的 Type 选择 Field Reference, Value 为 [Case].Id。

WeChat Notification Template ID 的 Value 为创建的模板的 Id。

Contact 的 Type 选择 Field Reference, Value 为 [Case].ContactId。

最后,点击 Save, 点击右上角的 Activate 激活。

5. 创建 Process Builder, 将 Survey Taken 和 Case 关联。

登录 Salesforce,点击 Setup | Process Builder,新建 Process Builder,选择 Object 为 Survey Response,保存后在 Choose Object and Specify When to Start the Process 中选择 when a record is created or edited,如图:

Screen_Shot_2021-06-16_at_5.31.44_PM.png

保存后在 Define Criteria for this Action Group 页面的配置如下图所示:

7.png

其中,Field1 为:[Charket__SurveyResponse__c].Charket__SurveyTaken__c

Field 2 为 [Charket__SurveyResponse__c].Charket__SurveyQuestion__r.Charket__Question__c

点击 Save, 在 Select and Define Action 页面的 Action Type 中选择 Update Records, 在 Record Type 中设置如下图所示:

8.png

点击 Choose 后设置 Set new field values for the records you update 如下:

9.png

其中:Field 为 Case, Type 为 Formula, Value 为 [Charket__SurveyResponse__c].Charket__Response

然后点击 Use this Formula 之后,点击 Save, 然后点 Activate 激活。

Charket
扫码获得帮助