Runscript

The icon for the Runscript action - a curved piece of paper.

呼び出し元のスクリプトの拡張であるかのように、スクリプトの実行を新しいスクリプトに続行します。

Runscriptを使用する利点の1つは、1つの大きなスクリプトを作成する代わりに、小さなスクリプトを作成できることです。

Dependencies

  • メインスクリプトとサブスクリプトは同じフォルダに含まれている必要があります。
  • たとえば、メインスクリプトが電話スクリプトである場合、サブスクリプトも電話スクリプトである必要があります。たとえば、メインスクリプトが電話スクリプトである場合、サブスクリプトも電話スクリプトである必要があります。
  • ContactIDは、メインスクリプトとサブスクリプトの両方で同じになります。
  • Runscriptがサブスクリプトをトリガーした後、メインスクリプトは実行を2番目のスクリプトに渡し、実行されなくなります。両方のスクリプトを同時に実行する場合は、Spawnactionを使用します。最初のスクリプトのすべての変数は、2番目のスクリプトにそのまま残ります。
  • 別のスクリプトを実行し、完了時に最初のスクリプトに戻る場合(プログラミングサブルーチンのように)、値を渡したり返したりする機能を含めて、Runsubactionを使用します。
  • Runscriptが添え字をトリガーすると、メインスクリプトが終了します。
  • RunScript SpawnRunsub、または同様のスクリプトによって呼び出されるすべてのスクリプトは、有効でアクティブである必要があります。保存プロセス中に、 Studioはアクションによって呼び出されたすべてのスクリプトを検証します。それらのいずれかが無効または非アクティブである場合、 Studioにはエラーが表示され、保存できなくなります。

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.

ジェネリック

Eメール チャット 電話 ボイスメール ワークアイテム SMS デジタル

Comparison of Similar Actions

以下のアクションには同様の機能がありますが、いくつかの重要な相違点があります。

  • RunscriptRunscriptがサブスクリプトをトリガーすると、そこから最初のスクリプトに戻る方法はありません。
  • RunsubRunsubがサブスクリプトをトリガーすると、サブスクリプトにReturnアクションがある限り、スクリプトは最初のスクリプトに戻ることができます。Returnアクションは、添え字が終了したときにRunsubアクションに値を返します。

Input Properties

これらのプロパティは、アクションが実行時に使用するデータを定義します。

プロパティ

説明

を追加

スクリプト内でこのアクションを一意に識別できる、短いフレーズを入力します。アクションアイコンにカーソルを合わせるとキャプションが表示されます。The default is the action name.

ScriptName

生成するスクリプト。アクションのプロパティボックスの上部にあるChoose Scriptリンクをクリックして、事業単位用に保存されているスクリプトを選択できます。

Result Branch Conditions

None

Script Example

この例は完全なスクリプトではありません。このアクションを使用するには、追加のスクリプト作業が必要です。

The following example is a part of a much larger script. In this example, Runsub triggers a different script, in which the Return action enables the Case action in the script below to determine whether the organization is open, closed, or on holiday. If it is determined that the office is closed or on holiday, a Play action will play a specific message (either a closed message or a holiday message). The Runscript will then terminate the script and trigger the subscript.

An example script, showing Studio actions with arrows connecting them. Each action has a label beneath it to indicate what the action does in the script.

Would you like to download this script?

The subscript that Runscript triggers is shown below. The script enables the contact to leave a message. The main script passed a variable with the caller ID and contact ID閉じた 各コンタクト先に割り当てられた一意の数値識別子 to the subscript, which enables the contact to leave a message, review a message, take corrective action if no voice was heard, or to enable the contact to re-record their message.

An example script, showing Studio actions with arrows connecting them. Each action has a label beneath it to indicate what the action does in the script.

Would you like to download this script?