Call External Function
This workflow object calls an external software module, via an API, that executes custom logic that can, amongst other things, determine the next step in the workflow.
1. An Example Scenario
A caller has entered a club membership number that is to be sent to a validation module. The submitted value is the membership number which is a data label previously captured by a Capture Digits object. The returned data might be a numeric status value denoting the validation result:
If 0 then membership is current so go to Join Queue object.
If 1 then membership has lapsed so go to Play Sound object ("Your membership has expired").
If 2 then the number entered is invalid so go to Play Sound object ("The membership number you entered is invalid. Please re-enter"), then Go To Object to re-enter the membership number.
2. Add Workflow Object
Open the Workspace.
Select Workflows from the Resources menu.
Select a workflow from the list displayed (you can also create a new one).
Click the Preview icon next to your selected workflow. A schematic representation of the workflow is displayed.
Click the Add New Object icon The New Workflow Object dialog opens.
Select Call External Function from the drop down selection list.
When you include Call External Function in your automated workflow, enter the following details:
Workflow Object Title
Enter a meaningful name for your new object.
Enter the textual label that will be saved in the record of this object's execution in the ivr_activities table.
Enter the name of the module that contains the function that will be called by this object, as advised by the developer of the module. The module must contain one or more callable functions.
Enter the name of the API method as advised by the person who has developed the module.
Enter the text string defining the variables/text that will be passed to the external function. Fields must be separated from each other by commas. There are 5 allowable types of variable/text:
Campaign Data Field Variable
The field is taken from the campaign's user-defined contact or activity data fields.
IVR Digit Capture Variable
The field is the data label of a digit capture object, which is user-defined.
Result of an External Call Function Variable
One of the data fields returned by a previous "Call External Function" object.
Activity Table Data Field
One of the system-defined data fields that holds details of the call itself. The full set of data fields that can be accessed are listed at Read Only Activity Data Fields.
Enter the text string defining the variables that will be passed back by the external function. These variables will be inserted in the appropriate database tables based on their variable types. Variables must be separated from each other by commas. There are 3 allowable types of variable:
Campaign Data Field Variable
The result will be written to either the relevant contact or activity data table.
The result will be written to the relevant field in the ivr_activities table.
The result will be written to the relevant field in the integration_ivrdata_results table.
Click Save to keep your new object and to return to the Workflow Builder.