Flow Lab

General Information

The Flow Lab is an auxiliary tool for working with the Flow Designer or Flow Editor. It allows you to simulate the behavior of the IVR within the app. This allows you to test several scenarios for a call flow quickly and easily.

The Flow Lab is structured with its functionality as follows:

  1. Start/Stop Session Button: Starts and ends the session. Make sure you have saved the flow beforehand.
  2. Customer Device: This field simulates the Customer Device. Among other things, it is possible to make DTMF entries here later, e.g. in the menu component. In addition, the calling or called number can be entered. These are also passed directly to the Flow Designer as variables.
  3. Status Configuration: Here settings such as business hours can be simulated from iAGENT within the app. In addition, you can further simulate queries at the IVR, such as how many agents handle inbound calls that come in through a seprific queue.
    If you simulate a call flow within the Flow Designer, no settings from iAGENT apply, but only everything that is configured within the Status Configuration.
  4. Logging: Here the logs are output, which is useful for testing and debugging.

Status Configuration

Business Hours & Holidays

Since version 6.1, business hours and holidays are treated as one object of business hours because holidays are necessarily associated with a business hour. The result field is containing a JSON with one attribute each for the status of the business hours (Boolean) and the holidays (String Array) that are currently configured in iAGENT.

For example, if you want to create a flow that takes into account the global business hours, you have to add a JSON to the status configuration that contains the information about the status of the business hours and, if desired, an active holiday. An example would look like this:

{
isActive: true,
activeHolidays:["Christmas", "Easter"]
}

Example configurations for business hours look like this. Only the businesshour object is needed. The holidays and the status of the business hours are attached to the object.
 
Attribute Key Object Key Result
businesshour.category <Name of a Category>
{ isActive: true, activeHolidays:[""] }
businesshour.global <not required >
{ isActive: true, activeHolidays:[""] }
businesshour.name <Name of the iAGENT businesshour object>
{ isActive: true, activeHolidays:[""] }

Business Hours & Holidays Example

To clarify this, here is a small example flow, in which the branch is queried whether a business time is active or not. In the flow, the name of the business hours is marked in red. The status of the business hours is marked blue in the JSON result field. This is set beforehand in the action component via Set business hours where you can select from the business hours stored in iAGENT.

The status of the business hours in iAGENT is independent of the status in Flow Lab.

If you now press Start Session, the flow will end up in the True node. If you change the value in the JSON in the Result field to false and activate Start Session again, the flow will end up in the False node. The same applies to holidays. There you have to enter the name of the holiday in the JSON and in the switch component you can compare the holiday with a string variable.

flowlab2.png

 

Other Keys

Besides business hours and holidays, other keys can be set. For example, with the key call.agents.available it is possible to create a branch in the flow according to the available agents. The optional JSONs are composed as follows:

{
    "category""Sample Category",
    "location""Sample Location",
    "language""Sample Language"
}
 
 
Attribute Key Object Key Result
systemstatus.available <not required> “true” or “false”
systemstatus.available <not required> “true” or “false”
call.agents.available optional: JSON containing category and location Number of available Agents as number
calls.queued optional: JSON containing category, location and language Number of queued Calls as number
call.queue.position call id of the PBX as string Number of queue Position as number

The following is an example for a sample flow with such a custom flow. In this scenario, we create a flow in which we make a branch according to the number of Available Agents. First we create a custom Number variable and apply the changes.

doku1.PNG

Next, we create the flow itself. This includes a Javascript component where we will add custom Javascript code and a Switch component that differentiates according to the number of available agents.

doku2.PNG
doku3.PNG

In the example the caller should run into the left branch in the flow as soon as more than 1 agent is available, as soon as less or only 1 agent is available into the right branch. Therefore, we need to setup the Flow Lab and Javascript Component. In the Javascript Component we use following custom code:

var attributeKey = 'call.agents.available';
var response = status.get(attributeKey);
agentsAvailable=response.result;
 

With following setup in the Flow Lab:

doku4.PNG

If we run the Flow Lab now, we will get the following result:

doku5.PNG

The call lands in the right branch, as expected. In a real scenario, it is often necessary to query the available agents at a category. This can be implemented with small adjustments with this example. To do this, you need to slightly modify the Javascript code:

var attributeKey = 'call.agents.available';
var categoryObject = {
"category""categoryName",
}
var response = status.get(attributeKey, JSON.stringify(categoryObject));
agentsAvailable=response.result;
 

This newly created object must be created again in Flow Lab as an object key. Now all available agents of the category “categoryName” are returned.

Error codes

If errors occur in the Flow Lab, they will be displayed in the log window. In order to be able to better understand where an error comes from and to correct them, they are provided with error codes. All error codes are listed in the following table.

Code Error Type Description Occurence Caused if
-900 connection The remote system is not available. IVR or connector any connection between IVR, connector or iAGENT is down when the request is initiated
-901 connection The request timed out after 5000 ms. IVR, connector or iAGENT the request was not answered within 5000 ms
-902 connection The request could not be processed due to connection loss. IVR or connector any connection between IVR, connector or iAGENT is terminated within the timeout duration of an ongoing request
-903 connection The request was answered with an invalid response. IVR, connector or iAGENT the response to the request was in an invalid or unexpected format
-950 input/data Invalid attribute key. IVR or iAGENT the attribute key is null, undefined or empty
-951 input/data Unknown attribute key. iAGENT the attribute key is valid, but does not match any known query operation
-952 input/data Invalid object key. IVR or iAGENT the object key is null, undefined or empty
-953 input/data Restricted object key. iAGENT the attribute key and object key are valid, but the object key or the corresponding data is restricted
-954 input/data No data found. iAGENT no data can be returned and an empty result (e.g. “”) is not applicable for the requested data
-955 input/data The requested category does not exist iAGENT The requested category does not exist in the system
-956 input/data The requested location does not exist iAGENT The requested location does not exist in the system