Contact flow modules for reusable functions - Amazon Connect

Contact flow modules for reusable functions

Contact flow modules are reusable sections of a contact flow. You can create them to extract repeatable logic across your flows, and create common functions. For example:

  1. You can create a module that sends SMS text messages to customers.

  2. You can invoke the module in contact flows that handle situations where customers want to reset their passwords, check their bank balances, or receive a one-time password.

Following are the benefits of using modules:

  • Simplify managing common functionality across flows. For example, an SMS module could validate the format of phone number, confirm SMS opt-in preferences, and integrate with an SMS service, such as Amazon Pinpoint.

  • Makes it more efficient to maintain flows. For example, you can quickly propagate changes across all flows that invoke a contact flow module.

  • Helps separate flow designer responsibilities. For example, you can have both technical module designers and non-technical flow designers.

Where you can use modules

You can use modules in any contact flow that is type Inbound contact flow.

The following types of flows do not support modules: Customer queue, Customer hold, Customer whisper, Outbound whisper, Agent hold, Agent whisper, Transfer to agent, Transfer to queue.

Security profile permissions for modules

Before you can add modules to Inbound contact flows, you must have permissions in your security profile. By default, the Admin and CallCenterManager security profiles have these permissions.

Create a module

For information about the number of modules that you can create for each Amazon Connect instance, see Amazon Connect service quotas.

  1. Log in to the Amazon Connect console with an account assigned to a security profile that has permissions to create modules.

  2. In the navigation pane, choose Routing, Contact flows.

  3. Choose Modules, Create flow module.

  4. Add the blocks that you want to your module. When finished, choose Publish. This makes the module available to use in other contact flows.

Add a module to a contact flow

  1. Log in to the Amazon Connect console with an account assigned to a security profile that has permissions to create contact flows. You don't need permissions to create modules.

  2. In the navigation pane, choose Routing, Contact flows.

  3. Choose Create contact flow or select an existing contact flow that is an Inbound type.

  4. To add a module, go to the Integrate section, and choose Invoke flow module.

  5. When you're finished creating your flow, choose Publish.

Example module

This module shows how to get random a fun fact by invoking a Lambda function. The module uses a contact attribute ($.Attributes.FunFact) to retrieve the fun fact. Flows that invoke this module can play a FunFact to customers, depending on their incoming contact type.

The inbound flows in your instance can invoke this common module and get the fun fact.

Following is an image of the FunFact module:

Following is an image of the FunFactSampleFlow that invokes the module: