Loading
Agentforce 與 Einstein 生成式 AI
條件邏輯範例 (Beta 版)

條件邏輯範例 (Beta 版)

將這些範例條件式區塊複製到使用「封鎖編輯器」的提示範本。

必要版本

提供版本:Lightning Experience
提供版本:具有 Einstein for Platform、適於銷售的 Einstein 或 Agentforce 或 Service 附加元件,或適用於 Agentforce Foundation 的 Enterprise、Performance 及 Unlimited Edition
重要
重要 範例包含提示範本資源的預留位置文字。預覽模型回應範例前,請先以合併欄位取代每個預留位置。

將這些範例複製到使用「封鎖編輯器」的提示範本。使用 @ 選擇器中的資源取代每個合併欄位。在您啟用範本之前,預覽符合且不符合每個條件的範例記錄。若要新增條件式區塊,請參閱 將條件式邏輯新增至提示範本 (Beta 版)。

依優先順序變化個案摘要

提示範本類型:記錄摘要或彈性

物件:個案

使用此範例可在個案優先順序為「高」時變更語氣。

此提示範本包含此合併欄位的預留位置文字。

  • {!Case.Priority}

在「區塊編輯器」中,新增條件式區塊。在條件欄位中,輸入:

{!Case.Priority} == "High"

在 if 分支中,輸入此內容。

This case requires immediate attention. Summarize the issue with urgency and flag any SLA risk.

在 else 分支中,輸入此內容。

Summarize the case for routine follow-up.

如果提示範本使用 Jinja,則此為相等範本內文。請勿將 Jinja 標記貼到「封鎖編輯器」條件欄位中。

{% if Case.Priority == "High" %}
This case requires immediate attention. Summarize the issue with urgency and flag any SLA risk.
{% else %}
Summarize the case for routine follow-up.
{% endif %}

略過空白電子郵件地址

提示範本類型:銷售電子郵件或彈性

物件:連絡人

使用此範例可避免在產生的草稿中處理空白電子郵件。

此提示範本包含此合併欄位的預留位置文字。

  • {!Contact.Email}

在「區塊編輯器」中,新增條件式區塊。在條件欄位中,輸入:

{!Contact.Email}

在 if 分支中,輸入此內容。

Draft a follow-up email to the address in {!Contact.Email}.

在 else 分支中,輸入此內容。

No email is on file. Draft a note for the rep to collect contact information first.

如果提示範本使用 Jinja,則此為相等範本內文。請勿將 Jinja 標記貼到「封鎖編輯器」條件欄位中。

{% if Contact.Email %}
Draft a follow-up email to {{ Contact.Email }}.
{% else %}
No email is on file. Draft a note for the rep to collect contact information first.
{% endif %}

結合優先順序與帳戶類型

提示範本類型:彈性

物件:個案、帳戶

當您需要一個以上的條件時,請使用此範例。請使用 Account.Type,而非自訂層級欄位,除非您的組織有該欄位。

此提示範本包含這些合併欄位的預留位置文字。

  • {!Case.Priority}
  • {!Account.Type}

在「區塊編輯器」中,新增條件式區塊。在 if 條件欄位中,輸入:

{!Case.Priority} == "High" and {!Account.Type} == "Enterprise"

在 if 分支中,輸入此內容。

Generate an executive-ready summary for immediate leadership visibility.

按一下「新增其他條件」。在「其他 if 條件」欄位中,輸入:

{!Case.Priority} == "High" or {!Account.Type} == "Enterprise"

在「其他 if」分支中,輸入此內容。

Generate a standard priority summary.

按一下「新增其他項目」。在 else 分支中,輸入此內容。

Generate a routine summary.

如果提示範本使用 Jinja,則此為相等範本內文。請勿將 Jinja 標記貼到「封鎖編輯器」條件欄位中。

{% if Case.Priority == "High" and Account.Type == "Enterprise" %}
Generate an executive-ready summary for immediate leadership visibility.
{% elif Case.Priority == "High" or Account.Type == "Enterprise" %}
Generate a standard priority summary.
{% else %}
Generate a routine summary.
{% endif %}
 
正在載入
Salesforce Help | Article