ASSIGN
此説明頁面適用於 Studio。 此資訊亦適用於 Desktop Studio。
|
```
|
為使用者定義的變數指派一個唯一值。 |
支援的程式碼類型
|
|
|
|
|
|
|
|
|
|
通用 |
電郵 | 聊天 | 電話 | 語音郵件 | 工作項目 | SMS |
|
輸入屬性
這些屬性定義了動作執行時使用的資料。
|
```
屬性 ``` |
描述 |
|---|---|
|
新增標題 |
Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon. |
| 變數 | The name of the variable that you want to hold the value. |
| 值 | 將被儲存的值或資料。 |
| 類型 | Choose from String, Numeric, or Datetime. The type you select here changes the Value property to interpret the data entered in the Value field. For example, if you select String and enter the value 1+1, the actual value assigned to the variable is 1+1. However, if you select Numeric and enter the value 1+1, the value assigned to the variable is 2. |
| 螢幕彈出畫面 |
您建立的變數的屬性。 當設定為true時,變數的值會顯示在為客服專員顯示的預設螢幕彈出 此選項不適用於數碼 值模式中:點擊是以啟用在預設螢幕彈出畫面中顯示此值。 在運算式模式中:輸入 True,以啟用在預設螢幕彈出畫面中顯示此值。 |
| 儲存至資料庫 |
```
您建立的變數的屬性,用於控制變數值是否儲存到NiCE CXone平台資料庫。 您可以透過兩種方式存取儲存的資料: 在 The default is 值模式中:點擊是可將此值儲存到資料庫。 在運算式模式中:輸入 True 可將此值儲存到資料庫。 ``` |
| 最大字串尺寸 | The maximum size in KB of the value that can be stored. The default size is 2 KB. 從以下選項中選擇:限制 2K、限制 4K、限制 8K、限制 16K、限制 32K。 |
結果分支條件
結果分支條件允許您在指令碼中建立分支,以處理執行動作時的不同結果。
|
條件 |
描述 |
|---|---|
| 預設 | 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 if the value assigned to the variable exceeds the maximum string size. |
提示與技巧
- 使用 Assign 來設定字串或數值/數字變數的目錄。
- 了解如何使用Assign動作,在「Variables」說明頁面上新增或編輯變數的值。
- 當變數名稱相符,且指令碼Assign動作設定為ScreenPop = true時,指令碼變數值將自動合併或預先填入客服專員應用程式中的快速回覆變數。 如果變數值合併成功,代理將保留手動修改已預先填入的快速回覆欄位的能力。 配置為 ScreenPop 的變數資料總大小不得超過 200 KB。 較大量的資料可能會使客服專員應用程式的效能變慢。
- 在子腳本中包含關鍵字 global 於變數名稱之前,以建立全域變數。 例如:Global:varName
程式碼範例
下面是一個範例,說明如何在指令碼中使用此動作。 這不是一個完整的指令碼。 可能需要額外的指令碼。
Begin 會觸發一個Menu,提供三個選項,按 1 選擇銷售、按 2 選擇支援,或按 3 選擇帳戶管理。當使用者選擇一個選項時,程式碼會使用特定的 Assign 動作,為 技能 ID 指派一個值,而 Countagents 會用此值來判斷已登入該技能的客服專員數目。If 動作接著會使用表達式 (TOTAL=0) 來判斷在有客服專員登入的情況下應採用哪一個分支-TRUE 代表該技能已登入的客服專員總數等於 0,程式碼將會運行另一個用於留言的獨立程式碼。FALSE 代表已登入的客服專員總數不等於 0,而 Reqagent 會使用 Assign 中的變數值,依據該技能要求一位客服專員(透過 Newskill 中的技能 ID)。