By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Integrating an Amazon Connect Customer Profiles Domain with Amazon Connect by API

2 minute read
Content level: Advanced
0

This article provides guidance for customers using API-driven Amazon Connect implementations to integrate Customer Profiles with Amazon Connect Data.

Integrating an Amazon Connect Customer Profiles Domain with Amazon Connect by API

Overview

This article provides guidance for customers using API-driven Amazon Connect implementations to integrate Customer Profiles with Amazon Connect Data.

Pre-Requisites:

  1. Have an Amazon Connect Instance created either by using the AWS Console, AWS SDK, or AWS CloudFormation deployment.
  2. Have a Customer Profiles Domain created either through the AWS SDK or AWS CloudFormation deployment.

Key Step: To Integrate an existing Amazon Connect Instance with an existing Customer Profiles Domain, you have to create a Customer Profiles Integration using the Amazon Connect Instance ARN as the Integration URI.

  • Set DomainName to your Customer Profiles domain name
  • Set Uri to your Connect Instance ARN

Integration Method using PutIntegration API

The PutIntegration API can be used to integrate a Customer Profiles domain with Amazon Connect. Below are two sample code snippets written using Javascript (AWS SDK V3) and Python3.

Javascript (AWS SDK V3) Example

API Docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/customer-profiles/command/PutIntegrationCommand/

import { CustomerProfilesClient, PutIntegrationCommand } from "@aws-sdk/client-customer-profiles"; // ES Modules import
// const { CustomerProfilesClient, PutIntegrationCommand } = require("@aws-sdk/client-customer-profiles"); // CommonJS import
const client = new CustomerProfilesClient({});
await client.send(new PutIntegrationCommand({
  DomainName: 'ExampleDomain',
  Uri: 'arn:aws:connect:us-east-1:123456789012:instance/11111111-1111-1111-1111-111111111111' 
}));

Python3 (Boto3 SDK) Example

API Docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/customer-profiles/client/put_integration.html#

import boto3
client = boto3.client('customer-profiles')
client.put_integration(
  DomainName='ExampleDomain',
  Uri='arn:aws:connect:us-east-1:123456789012:instance/11111111-1111-1111-1111-111111111111',
)

Integration using AWS CloudFormation

The AWS::CustomerProfiles::Integration resource can be used to integrate a Customer Profiles domain with Amazon Connect in CloudFormation. Below are two sample templates written in YAML and JSON format that will integrate a given Customer Profiles domain with the specified Connect Instance ARN.

YAML

AWSTemplateFormatVersion: 2010-09-09
Resources:
  CustomerProfilesConnectIntegration:
    Type: AWS::CustomerProfiles::Integration  
    Properties:
        DomainName: ExampleDomain
        ObjectTypeName: CTR
        Uri: arn:aws:connect:us-east-1:123456789012:instance/11111111-1111-1111-1111-111111111111

JSON

{
	"AWSTemplateFormatVersion": "2010-09-09",
	"Resources": {
	  "CustomerProfilesConnectIntegration": {
	    "Type": "AWS::CustomerProfiles::Integration",
	    "Properties": {
	      "DomainName": "ExampleDomain",
	      "ObjectTypeName": "CTR",
	      "Uri": "arn:aws:connect:us-east-1:123456789012:instance/11111111-1111-1111-1111-111111111111"
	    }
	  }
	}
}

Summary

Integrating Amazon Connect with Customer Profiles provides a unified customer profile across channels. This can be achieved through the PutIntegration API or CloudFormation. The key to enabling this integration is to specifying the Connect Instance ARN as the integration URI in either integration method.