Capture

此説明頁面適用於 Desktop Studio。 此資訊亦適用於 Studio。

支援的程式碼類型

電話指令碼類型的圖示 - 一種帶有彎曲電話線的老式電話聽筒,表示會發出聲音。

電話

輸入屬性

這些屬性定義了動作執行時使用的資料。

屬性

描述

標題

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon. The default is the action name.

變數 The name of the variable that you want to hold the DTMF value that the contact enters.
MaxDigits 此動作允許使用者提供的數字的最大位數;例如,如果 Prompt 要求輸入人員社會安全號碼的最後四位數字,請將此值設為 4。 預設值為 1。 若提示需要結尾字元(例如井字號或 #),您必須在設定 MaxDigits 值時將其考慮在內。 例如,如果已錄製的選單訊息要求輸入社會保安號碼的最後4位數字,然後按井號鍵,請將該值設定為5。 當達到MaxDigits值時,程式碼會繼續沿著 MaxDigits 分支執行(如果已連接)。
結尾字元

輸入您希望聯絡人輸入的字元,表示他們已經完成了數字輸入。 例如,井字號 (#) 通常用作結尾字元。 如果您不想在此動作中使用終止字元,請將此屬性留空。

終止字元存儲在變數中,除非您在終止字元欄位的後面加一個減號。 例如,#-。

如果您指定了終止字元,必須將其包含在 MaxDigits 屬性的字元數中。

逾時 動作在逾時前等待執行的秒數。此數值必須介乎0與60之間。
InterDigitTimeout The amount of time after the contact enters a digit that the system waits to see if the contact enters another digit. You must create scripting logic to handle a timeout.

結果分支條件

結果分支條件允許您在指令碼中建立分支,以處理執行動作時的不同結果。

條件

描述

預設 Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined.
結尾字元 Path taken when the caller provides the value specified in the property.
MaxDigits Path taken when the caller's input reaches the MaxDigits value.
逾時 Path taken if there is no response for the number of seconds specified.
InterDigitTimeout Path taken when the time specified in the InterDigitTimeout property is exceeded during the caller's DTMF response to a prompt.

小貼士及技巧

  • 聯絡人可能會在執行 Capture 動作之前按下數字鍵,例如在聽語音提示時。 這些數字儲存在數字緩衝區內,在廚房 Capture 動作時即會將其包含在內。
  • 若要在發出 Capture 之前清除數字緩衝區,請先發出另一個已將 Timeout(逾時)屬性設為零的 Capture。

程式碼範例

下面是一個範例,說明如何在指令碼中使用此動作。 這不是一個完整的指令碼。 可能需要額外的指令碼。

在此例中,聯絡人在佇列中,指令碼將請求聯絡客服專員。 在此期間,會播放音樂。 如果聯絡人在播放音樂期間按鍵盤上的任何數字(DTMF 音),聯絡人將關注該數字分支,前往捕獲動作。 Capture 動作將儲存的 DTMF 音調儲存為 Capture 動作中的使用者定義變數值。 在此案例中,變數名稱為 CallbackReq。 然後,If 動作會檢查變數值,並使用運算式(CallbackReq=1)來決定關注TRUE分支還是FALSE分支。 如果為TRUE,則聯絡人會繼續執行Play動作,並接著進行回呼Closed 為客戶保留佇列中的位置,並在客戶輪到排在佇列最前面時自動致電客戶。。 如果FALSE,音樂將會繼續播放另外30秒。

在該指令碼中,MUSICaction 有一個連接到 CAPTURE 的分支,而 CAPTURE 連結到 IF,IF 有兩個連接到 true 和 false 的分支。

是否要下載此指令碼?