Skip to main content

Uniphore Customer Portal

Setup Amazon Connect Media Integration Instance
Prerequisites

The following permissions are required for Amazon Connect integration.

  • AmazonDynamoDBFullAccess

  • AmazonKinesisReadOnlyAccess

  • AmazonKinesisVideoStreamReadOnlyAccess

  • CloudWatchPutMetricData

To create an Amazon Connect instance
  1. Open the Amazon Connect console at https://aws.amazon.com/console/.

  2. Choose Get started and select Add an instance.

    Set_identity_1.png
  3. By default, the option 'Store users in Amazon Connect' is selected. There is no need to change the selection.

  4. Mention the instance name in the Access URL field. It must be unique across all Amazon Connect instances in all Regions. You cannot change the access URL after creating your instance.

    custom_url.png
  5. Click Next. Mention the required administrator details for this instance of Amazon Connect.

    Admin_details_1.png
  6. Click Next. Ensure that both the checkboxes are selected to accept inbound calls and make outbound calls.

    telephony_setup.png
  7. Click Next. By default, Amazon Connect creates buckets for storing call recordings, chat transcripts, exported reports, and contact flow logs.

    data_storage.png
  8. Click Next. Review the configuration choices. Note that you cannot change the identity management options after you create the instance. If you want to make any of the configuration changes, click Edit.

    review_and_create.png
  9. Click Create instance. The newly created instance is listed in the Instances page.

Important

Each Amazon Connect Instance can only be used for a single application or tenant.

Refer to the link below for more information on how to set up an Amazon Connect instance.

https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-instances.html

Enable media streaming for Amazon Connect instance
  1. Click on newly created instance and select the Data storage option from the left pane. In the Live media streaming section, click Edit and select 'Enable live media streaming' checkbox. Mention the Live Media Streaming KVS Prefix as shown below and then click Save.

    live_media_streaming.png
  2. Select the Data streaming option from the left pane. Select the checkbox Enable data streaming to put records to your Kinesis Stream. Select Kinesis Stream option in the Contact Trace Records section. If Kinesis Streams for Contact Trace Records and Agent Events have already been created, select the relevant Stream from the respective dropdown lists.

    enable_data_streaming.png

    If you don't have already created Streams, click Create a new Kinesis Streams in the Contact Trace Records and Agent Event sections to create new data streams. For creating a new stream, refer here.

  3. Select the newly created streams from the Contact Trace Records and Agent Events dropdown lists.

    data_streaming.png
  4. Select the Flows option from the left pane. In the AWS Lambda section, click Create a new Lambda function.

    AWS_lambda.png

    For more information on creating a Lambda function, click here.

Create a new Kinesis Stream
  1. Click Create a new Kinesis Stream to open the Kinesis console and create the stream.

    create_data_stream.png
  2. Click Create data stream. Mention the data stream name and click Create data stream. Two streams must be created: mediastream and agentstream.

    new_data_stream.png
Create Lambda function for integration

A Lambda function, written in Node.js, is required to obtain the KVS Media Stream of an Amazon Connect call to connect with U-Assist. The sample code below demonstrates how to create the lambda function in AWS. You should map the same Lambda function with the Amazon Connect instance described below.

For sample Lambda function, click here.

  1. In the Functions page, click Create function. Mention the Function name and click Create function.

    create_function.png
  2. After successfully creating the function, a confirmation message will be displayed. In the Code tab, add the sample Lambda function given above and then click Deploy.

    success_msg_lambda_function_creation.png
    code_index.png
  3. Click Configuration tab and select the Environment Variables option from the left pane.

    environment_variable_option.png
  4. Click Edit to navigate to Edit environment variables page and then click Add environment variable to map Lambda function to the media stream. Mention the value as 'streamName' in the Key field and the Kinesis Stream name provided in the Contact Trace Records field in the Value field.

    add_env_variable.png
  5. Click Save. The mapped stream name will be listed as shown below.

    env_variable_lambda.png
  6. Select the Permissions option from the left pane. Click on the newly created role name. The Identity and Access Management (IAM) page will be opened in a new browser.

    aws_role_name.png
    IAM_page.png
  7. Select Attach Polices from the Add permissions dropdown list to navigate to Specify permissions page. Assign this attached policy ‘AWSLambdaBasicExecutionRole’ to the Lambda function.

  8. Select Create inline policy from the Add permissions dropdown list to navigate to Specify permissions page. Each IAM policy statement applies to the resources that you specify using their Amazon Resource Names (ARNs).

    create_inline_policy.png

    Follow the steps given below to use the ARN resource for Kinesis data streams:

    1. Select Visual tab from the Specify permissions page. Select Kinesis service from the Service dropdown list.

      select_Kinesis.png
    2. Select the PutRecord option from Write Access level to write records to Kinesis Data Streams and then click Add ARNs in the Resources section to specify stream resource ARN.

      access_level.png
      specify_ARN.png
    3. From the Kinesis console page, click on the created data stream link to get an ARN of data stream for contact trace records. Click Copy icon (copy_ARN.png) from ARN section to copy the data stream's ARN.

      data_stream_link.png
      contact_trace_ARN.png
    4. Mention the copied ARN in the Resource ARN field of Specify ARN(s) screen which is shown in step b. If you mention the ARN, the stream name and resource region will be automatically updated.

      Kinesis_ARN.png
    5. Click Add ARNs to add the resource ARN.

      resource_ARN.png
    6. Click Next.

  9. In the Review and Create page, you can view the resource details of Kinesis service. Mention the policy name and click Create Policy. The newly created policy is listed as shown below.

    create_policy.png
    new_policy.png
  10. The newly created Lambda function and mapped media stream ARN will be listed in the AWS Lambda section for the created Amazon Connect instance.

    lambda_function.png
Import and Setup Contact Flows
  1. Login to Amazon Connect instance as an Admin using the access URL.

    AWS_access_URL.png
  2. Select Flows from the left pane and then click Create flow.

    create_flow.png
  3. Select Import (beta) from the dropdown in the Flows page.

    Import_flow.png
  4. Click Browse to select the sample contact flow and then click Import. The Flow name will be displayed at the top left side of the Flows page.

    browse_flow.png
    flow_name.png

    Use the below sample contact flows (.json) for inbound calls:

  5. Click Ellipsis (ellipsis_icon.png) icon in the AWS Lambda function section and select Edit settings. Select the newly created Lambda function from the dropdown.

    lambda_in_flow.png
  6. Click Save in the Edit Lambda Settings pop-up window.

  7. Click Ellipsis (ellipsis_icon.png) icon in the Contact Attributes section and select Edit settings. Mention the organization name, category name and CTI language.

    set_contact_attributes.png
  8. Click Save in the Edit Contact Attributes pop-up window.

  9. Click Ellipsis (ellipsis_icon.png) icon in the Working Queuesection and select Edit settings. If you have defined a specific queue to route customers to specific agents, choose that queue from the drop-down list. By default, the Basic Queue is assigned to the contact flow. For creating a new Queue, click here.

    set_working_queue.png
  10. Click Save in the Set Working Queue pop-up window, if you assign any specific queue.

  11. Click Save at the top right side of the Flows page and then click Publish. A confirmation message will be displayed to publish the flow. Click Publish in the message pop-up. The newly published Flow will be listed in the Flows page.

    published_flows.png