Configuring the Execute activity

The Execute activity enables IVR Routing to interact with external systems by running one of the following four processes:
  • Executable/Script – Runs an *.EXE file or *.BAT script on the server and delivers return values or parameters if the script executes successfully.
    Note:

    The Execute activity requires *.EXE files and *BAT scripts to be on a UNC path.

  • PowerShell – Runs a PowerShell script on the server and delivers return values or parameters if the script executes successfully.
    Note:
    • The Execute activity requires PowerShell scripts to be on a UNC path.
    • The Execution Policy for PowerShell scripts must be set in the command prompt window of PowerShell to Set-ExecutionPolicy RemoteSigned.
  • Web Service – Enables the Execute activity to retrieve a JSON or XML response from an external web service using SOAP or REST and delivers return values if the script executes successfully.
    Note:

    The data being returned must be valid XML characters. Any invalid characters (such as &, <, or >) will not return successfully and the workflow will route down the Failure branch. The XMLNode object type is not supported.

  • CRM Service – Sends user-defined queries to a Microsoft CRM 2011, Microsoft CRM 2013, or Microsoft CRM Online system and delivers return values if the script executes successfully.

For example, you can use the Execute activity to retrieve customer information from a Web Service database and store this information in a custom variable for use within the workflow or to pass on to agents in a screen pop for enhanced customer service. You could also use the Execute activity to run a PowerShell script enabling an authorized caller to run remote maintenance on the IVR Routing server. You can configure the options and the process types for Execute activities.

For an example of an IVR Routing workflow that uses the Execute activity to execute PowerShell and perform a web service SOAP call to a publicly accessible web service, see the following Mitel Knowledge Base article: http://micc.mitel.com/kb/KnowledgebaseArticle52022.aspx.

The Execute activity is available in
  • Inbound, Outbound, RAD, Inqueue, and Agent workflows
  • Inbound, Outbound, RAD, Management, UPiQ, Callback Inbound, and Agent subroutines
  • Inbound, Outbound, Inqueue, Agent, and Media workflows
  • Inbound, Outbound, Agent, Media, Management, UPiQ, and Callback Inbound subroutines
Note:

In most instances, a success return value indicates the process executed without errors, and the Success branch is followed. A failure return value indicates the process exited with errors and did not complete as expected, and the Failure branch is followed. If a success return value contains errors, it is recommended to map the return value to a variable and then use a Variable Compare activity to confirm if the output is a Success.