Assign

為使用者定義的變數指派一個唯一值。

Supported Script Types

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

The icon for the Digital script type - a computer monitor with a smartphone next to it.

一般

電郵 聊天 電話 語音郵件 工作項目 SMS 數位

Input Properties

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

屬性

描述

Caption

輸入在指令碼中唯一標識此操作的短語。標題出現在指令碼畫布上的動作圖示下。The default is the action name.

Variable 您想保留的變數名稱 the value.
Value 將被儲存的值或資料。
Type StringNumericDatetime 中選擇。您在此處選擇的類型會變更Value屬性,以解譯在Value欄位中輸入的資料。例如,若您選擇 String 並輸入值 1+1,則指派給變數的實際值為 1+1。但是,若您選擇 Numeric 並輸入值 1+1,則指派給變數的值為 2。
ScreenPop

您建立的變數的屬性。設定為 true 時,變數值將顯示在為客服專員顯示的預設螢幕彈出畫面Closed 可配置的彈出式視窗,包含有關聯絡人的資訊。它在某個事件後出現在客服專員的螢幕上,通常在客服專員連接到某個聯絡人時。中。必須啟用當前ACD 技能Closed 用於基於客服專員技能、能力和知識的互動的自動化傳遞使用螢幕彈出畫面選項。Select True to enable the display of this value in the default screen pop.預設為 False

SavetoDB

您建立的變數的屬性,用於控制變數值是否儲存到CXone平台資料庫。您可以透過兩種方式存取儲存的資料:

Snippet動作中使用變數時,也可以使用savetodb()變數屬性

Select True to enable this value to be saved in the database.預設值為 False

MaxStringSize 可儲存值的最大大小 (KB)。預設大小為 2 KB。

Result Branch Conditions

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

條件

描述

Default 指令碼未能滿足需要它採用其中一個分支的條件時採用的路徑。如果沒有定義動作的其他分支,也會採用該路徑。
Overflow 如果指派給變數的值超過最大字串大小,採用的路徑。

Tips & Tricks

  • 使用 Assign 為字串或數值變數設定內容。
  • 在變數説明頁面了解如何使用 Assign 動作 新增或編輯變數值
  • 當變數名稱相符並且指令碼 Assign 動作設定為 ScreenPop = true. 時,指令碼變數值將自動併入或預先填入 客服專員應用程式 中的 Quick Reply 變數。如果變數值合併成功,客服專員能夠繼續手動修改預先填入的 Quick Reply 欄位。配置為 ScreenPop 的變數資料總大小不得超過 200 KB。較大數量的資料可能減慢 客服專員應用程式 的效能。
  • 在子指令碼中建立一個全域變數,在變數名稱前面加上關鍵字 global。例如:Global:varName

Script Example

此範例不是一個完整的指令碼。使用此動作時需要額外的指令碼編寫工作。

Begin triggers a Menu that provides three options, press 1 for Sales, 2 for Support, or 3 for Account Management. When the user selects an option, the script uses a specific Assign action to assign a value for the Skill ID that Countagents uses to determine the number of agents logged in with that skill. The If action then uses an expression, TOTAL=0, to determine which branch to take if agents are logged in. TRUE means the total agents logged in does equal 0 for that ACD skill, and the script will run a separate script for leaving a message. FALSE means the total agents logged in does not equal 0, and Reqagent uses the variable value in Assign to request an agent with the skill (via the Skill ID in Newskill).

Download this script.