您位於此處:
使用個案:使用 if 條件根據複雜邏輯顯示內容
使用「如果條件」畫面元素動態顯示內容或畫面。例如,您可以使用「If 條件」新增頁尾,以根據先前的選取項目瀏覽至不同的畫面。透過「如果條件」畫面元素,Salesforce 會依序評估一或多個條件,並在條件評估為 true 時顯示內容。如果條件為 false,則邏輯會傳回其他預先設定的內容。不同於「切換」條件邏輯,「如果 條件」邏輯透過使用 AND 和 OR 邏輯運算子結合條件來支援複雜的條件。

使用較常見的搜尋字詞。
選取較少篩選條件以擴大您的搜尋。
使用「如果條件」畫面元素動態顯示內容或畫面。例如,您可以使用「If 條件」新增頁尾,以根據先前的選取項目瀏覽至不同的畫面。透過「如果條件」畫面元素,Salesforce 會依序評估一或多個條件,並在條件評估為 true 時顯示內容。如果條件為 false,則邏輯會傳回其他預先設定的內容。不同於「切換」條件邏輯,「如果 條件」邏輯透過使用 AND 和 OR 邏輯運算子結合條件來支援複雜的條件。
| 檢視支援的版本。 | |
此文章適用於:
|
增強型 WhatsApp 管道、統一的 WhatsApp |
此文章不適用於:
|
增強型應用程式內聊天、增強型 Web 聊天、標準和增強型 Facebook Messenger、標準和增強型 SMS、增強型 Apple Messages for Business、增強型 LINE 和自帶管道 |
| 需要的使用者權限 | |
|---|---|
| 若要建立傳訊元件: | 「自訂應用程式」和「檢視設定和組態」權限 或 系統管理員 |
| 若要在「傳訊」中傳送和接收訊息: | 傳訊工作人員 |
若要說明如何使用「如果條件」畫面元素,請考量此範例。您是 Veterinary Hospital Healthy Pets 的 Salesforce 管理員。您的工作是更新 WhatsApp 流程的最後畫面,以包含已排程的獸醫約會摘要。
摘要必須遵循此格式:
<doctor_name> 博士期待您<animal_type> 進行<visit_type>造訪。如果您有任何問題,請隨時連絡我們。
使用「如果條件」可根據造訪類型 (面對面或視訊通話) 和動物類型顯示不同的訊息。Catalina 博士僅處理貓親自造訪。Virtuoloso 醫生會處理其他任何類型動物的所有其他造訪,無論是虛擬造訪或面對面造訪。
此範例假設您已根據 Apex 類別建立表單傳訊元件,並建立「流程」格式。




We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.