Using the blocks

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Designer User's Guide for version Current of Designer.

Learn how functional blocks are used to build Designer applications.

Build logic

The Palette contains all of the blocks that you can use in Designer. They are organized into groups according to their type of function. For example, the Routing section contains blocks related to routing functionality:

Des palette routing.png

These pages contain more information about the blocks in each category:

  • Logic and Control blocks add logical functions to applications, such as assigning variables, changing languages, or directing the application to other blocks.
  • User Interaction blocks interact with callers in various ways, such as offering them a list of menu options or invoking a voice or chat bot.
  • Business Control blocks control various operational aspects of your site, such as establishing and checking your hours of operation.
  • Routing blocks specify how an interaction should be directed when certain conditions are met, such as transferring a customer to an agent.
  • Data blocks manage various data-handling functions.
  • External Services blocks manage how an application taps into an external service.
  • Reporting blocks manage certain reporting functions within an application, such as starting or stopping an activity or indicating the progress of an application.
  • Callback blocks manage how Designer interacts with Genesys Callback services.
  • Survey blocks enable you to set up and offer surveys to customers.


You can drag any block from the Palette into the Application Flow and place it under the phase in which you want it to execute. If the block can be used in that phase, a placeholder block appears and you can drop the block to place it in that phase.

Des dragndrop.png

After placing a block, its details are shown in the Property view and you can configure the block and provide your application logic.

Click a block in the Application Flow at any time to select it, highlight it, and show its details.

Des blockhighlight.png

Each block has a default description, which you can edit to add your own description or comment.

Des block comment.png

You can place child blocks underneath some blocks. Child blocks are indented underneath their parent block. With the Menu and Segmentation blocks, this indicates that several outcomes are possible but only one path is followed when the application runs.

Des menuindent.png

In the above image:

  1. A user hears a menu prompt.
  2. The user enters input corresponding to one of the available menu options.
  3. The child blocks of that menu option execute before the application continues with the next block after the Menu block.

In this case, if the user chooses Menu Option 2, the Change Language block runs, followed by Assign Variables, and then the menu completes and moves onto User Input. The child blocks under Menu Option 1 and Menu Option 3 do not execute in this scenario.

In general, an indentation on the Application Flow canvas indicates that a decision or branch occurs, and one of several mutually exclusive paths is followed.

It is also possible for Menu or Segmentation blocks to be nested within one another - that is, a top-level menu option can lead to a second menu. This is indicated with multiple levels of indentation on the Application Flow. Once an option or a branch completes, the application returns one level higher and continues execution.

Tip
When you save your application, Designer also remembers if a group of nested blocks was expanded or collapsed. So the next time the application is opened for editing, the blocks appear in the same state as they were during the last save.

Moving and arranging blocks

To rearrange the order of blocks, you can drag and drop blocks around the Application Flow. Moving a parent block also moves any child blocks under it, so you can move entire groups of blocks together in one operation.

Des groupdrag.png

You can also move groups of blocks by clicking the arrows that appear when you hover over a block. This is useful if an application becomes large enough that dragging and dropping is unfeasible. These arrows show allowable operations on a block: up and down to move a block backward and forward within a phase, and left and right to change the indentation of a block underneath a parent block.

Des blockhover.png

You can also use the Copy and Paste functions (under Actions) to copy a block to another location in the flow, or to another module or application. Copying a parent block also copies any child blocks under it, so you can copy entire groups of blocks together in one operation. Keep in mind that blocks can only be copied to locations where that type of block is permitted.

Des copy paste.png

Under Actions, you can select Show Block ID or Show Block Type to toggle the visibility of those attributes. For example:

Des appflow actions showids.png

Searching the application flow

To search the blocks in the application flow, select Search from the Actions menu.

The search box appears in the main navigation bar and you can start typing the search term you are looking for. As you type, the items on the page are filtered to show only those items that match the text you've entered. The results are highlighted in the application flow, and you can use the up/down buttons to jump to the next or previous result.

If you click the More Options button, you can also select the Search by Block ID or Enable Deep Search options.

Des search more options.png

Search by Block ID can be useful if a particular block ID is flagged by Designer Analytics as having an issue. You can toggle the block IDs to be visible in the application flow and then use this search option to quickly locate the block in question.

The Enable Deep Search option enables you to search the entire application flow for a specific value or property. For example, you might search for blocks that contain a certain virtual queue.

For more about the search tools available in Designer, watch this video:

Limiting Application Indentation

Although Designer allows you to use several levels of indentation, you might not be able to access the block properties element if you have more than 10 levels of indentation.

To prevent your application from becoming too deeply indented, use Menu and Segmentation blocks to jump to specific points in the application. This takes control back to the main trunk and prevents the application from being too indented and difficult to understand. Menu and Segmentation blocks that do not terminate the application within a reasonable depth should include a Go To block to jump to a different part of the application.

Important
In certain cases, you might need to skip over certain parts of the main application. In these cases, use a Go To block to forward processing to the correct block in the application.

ECMAScript Expressions

Some block properties accept ECMAScript expressions that are executed by the application at runtime. This allows the application to perform dynamic operations, such as calling an ECMAScript function or combining the values of other variables.

In general, block properties do not support ECMAScript expressions unless otherwise stated. If ECMAScript expressions are not supported, you must enter a value (a string that is taken as a literal). This value is not evaluated at runtime. For example, in the Play Message block, the value of a TTS prompt is taken as a literal string.

Although the terms ECMAScript and JavaScript are often used interchangeably, Designer technically supports ECMAScript and does not support JavaScript functions that are typically used for web-browser based applications, such as pop-up windows, alerts, and so on.

Use caution! Any errors in your script can cause erratic behavior, so test your changes to make sure that your script works correctly before running it in your production environment. Designer can check your script for syntax errors, but cannot validate it nor check for runtime errors that might occur when the script is executed.

Supported Properties

The following block properties support ECMAScript expressions:

Tips

  • Strings must be quoted. For example, 'hello' is a string, whereas hello is a reference to a variable called hello.
  • Single quotes (') are recommended, as opposed to double quotes (").
  • When specifying an object in JSON notation, surround the JSON with parentheses. For example: ({'abc': 'def'}).

Examples

Below are examples of how you might use an ECMAScript expression in a Designer application.

Building a Dynamic TTS Prompt

You can use the Assign block to concatenate a string to be spoken by the application. The expression below reads the caller's phone number or ID.

'You are calling from ' + ANI

Control the Application Flow

A Segmentation block can take ECMAScript expressions that evaluate to a Boolean value, and thus control the flow of the application. For example, you might want to inform your customers about upcoming seasonal events and you need a way to determine the current season and whether the event is occurring within the coming week. The expression below determines whether the call was received within seven days of the event, and whether the current season is summer or autumn.

numDays > 7 && (isSummer | | isAutumn)

Assigning Variables

If you need to go beyond a simple value assignment, you can use advanced scripting on the Assign Variables Block to perform more complex variable assignments. Click here to see an example.
Warning
Due to certain platform dependencies, not all ECMAScript functions will work when used in Designer. For example, the toLocaleString function is not supported.


ECMAScript User Functions

Designer also has built-in ECMAScripts that you can invoke from a Designer application, such as from an Assign or Segmentation block, to perform certain functions at runtime.

isDataTableValueValid

You can use this function to determine if a value returned from a data table query is valid. For example, you might use the following function in an Assign block:

isDataTableValueValid(value, datatype)

This function has two arguments:

  • value is a single value returned from a data table query
  • datatype is the data type of the data table column, such as 'string', 'boolean', 'integer', 'announcement', or 'numeric' (this argument is optional)


If the data table value is valid, the script returns true. Here is a list of values that this function can return:

  • isDataTableValueValid(varStr, 'string') on a valid (or empty) string returns true. Anything else returns false.
  • isDataTableValueValid(varNum, 'numeric') on a valid number or 0 returns true. Anything else returns false.
  • isDataTableValueValid(varNum, 'integer') on a valid integer or 0 returns true. Anything else returns false.
  • isDataTableValueValid(varBool, 'boolean') on true or false returns true. Anything else returns false.
  • isDataTableValueValid(varAudio, 'announcement') on a valid (or null) announcement returns true. Anything else returns false.

Busy Treatments

A busy treatment is a special form of voice call handling that tells Designer what to do while a caller is waiting for their call to be connected with an agent. For example, you can play music for callers or provide them with updates about their estimated wait times.

Certain blocks allow you to specify audio files or self-service type shared modules as busy treatments.

Routing blocks

The Route Call, Route Digital, and Route Agent blocks have a Treatments tab where you can specify a busy treatment.

If you choose to add an audio-based treatment, a Play Message block is automatically nested below the routing block. Use this block to select and configure the audio options.

Important
If multiple consecutive Play Message blocks are added beneath a routing block as treatments, Designer considers them as one single treatment.

If you choose to add a module-based treatment, a Shared Module block is automatically nested below the routing block. Use this block to select the shared module that will be used as a busy treatment. Note that you can only select a Self Service shared module.

On the Route Digital block, you can add a chat or email treatment. Depending on which type of treatment you add, a Chat Message or Send Email block is automatically nested below the routing block. You can then use the block properties to set the treatment.

Busy treatments defined in routing blocks will loop automatically until a certain condition is met – such as the call is routed, the caller hangs up, or the timeout specified in the routing block expires – at which point the next block in the application is triggered.

Important
After a busy treatment has been executed at least 10 times, Designer exits the routing block and moves to the next block if the average duration of the treatment is less than 1000 ms (for example, due to a missing audio file).

Start Treatment block

The Start Treatment block also lets you specify a busy treatment, but it works a bit differently than the treatments used in the routing blocks.

Typically, you would use this block in the Assisted Service phase when you want to start a busy treatment — for example, play an audio file to callers while they wait to speak with an agent — and then move on to the routing blocks, all without interrupting the playback to the caller.

Things to keep in mind when using this option:

  • Don't define any additional treatments in the routing blocks that directly follow the Start Treatment block.
    You want the audio started by the Start Treatment block to continue playing while the routing blocks do their job. If a routing block starts another treatment, the treatment that is playing stops.
  • The Start Treatment block does not loop a module automatically.
    If you want to set up looping, you might need to use a GoTo block in the module or find another way to loop it back. For example, you might add additional logic in the module to detect which mode it is being used in. This will expose an input parameter that controls whether the module loops internally or not. Or, you could clone the module and have a different looping logic defined in the cloned module. (However, take note that this option creates copies of the same logical module and might make maintenance more difficult.)

Validation

Designer enforces a drag-and-drop policy to ensure that you can only place blocks into applicable phases. In rare scenarios, a block might be placed in an invalid phase. In these cases, the validation process that occurs after you click Publish will report this failure with an error that includes the blocks placed into invalid phases.

You can update many options without regenerating the code:

  • In the Business Hours block, you can:
    • change business hours of operation.
    • determine whether to terminate the call if it is outside business hours.
    • change the closed message (prompts).
  • Update the Emergency block.
  • Update prompts in the Menu block.
  • Update prompts in the Play Message block.
  • Specify the audio in the Play Audio tab of the Route Call block.
  • Update the Special Day block.
  • Update the input and retry prompts in the User Input block.
Tip
When nesting blocks, Genesys recommends that you do not go beyond ten (10) levels. Otherwise, you will receive a validation warning.
Retrieved from "https://all.docs.genesys.com/DES/Current/Designer/Blocks (2021-05-06 00:55:08)"