Skip to content

Search Customer Profile using a User defined attribute in my Chat Flow

0

Hello guys can anyone help me. currently I'm trying to search for a customer profile based on their custom attribute "reference_number" (under more information in agent workspace) i also tried using additional information but it always give me the same kind of error:

"Results": "Invalid Parameter Exception Was Thrown While Search Profile.",
....
"Parameters": {
"ProfileRequestData": [
"IdentifierName=",
"IdentifierValue=66212301"
]
}

On my flow i have: Customer Profile Block Setup

I created the customer profile by using:

client = boto3.client('customer-profiles')

def create_profile():
response = client.create_profile(
DomainName="amazon-connect-sample-name",
FirstName='John',
Attributes={
'reference_number': '66212301',
}
)

I also initiated this chat flow with the attributes reference_number which i can confirmed it exists on my check attributes block. but it seems i cant search on the customer profile's custom attribute.

For requirements compliance, It needs to be in a reference_number field.

Help would be appreicated thanks!

1 Answer
0

When searching for a customer profile based on a custom attribute like "reference_number", there are some important considerations to understand.

In Amazon Connect Customer Profiles, you can search for profiles using specific identifiers, but not all attributes are searchable by default. The search functionality in the agent workspace and in Customer Profile blocks is designed to work with standard identifiers like phone number, name, email, Account ID, or profile ID.

For your specific case, the error "Invalid Parameter Exception Was Thrown While Search Profile" with empty "IdentifierName=" suggests that the system doesn't recognize "reference_number" as a valid search key.

Custom attributes stored under "Attributes" (as in your profile creation code) are not directly searchable as identifiers. Instead, you should consider:

  1. Using standard searchable fields like AccountNumber, ProfileId, or other standard identifiers.
  2. If you need to search by your reference number, consider storing it as a standard field like AccountNumber when creating the profile, rather than as a custom attribute.

For example, when creating your profile, you might want to use:

response = client.create_profile(
DomainName="amazon-connect-sample-name",
FirstName='John',
AccountNumber='66212301'
)

Then in your Customer Profile block, you could search using "AccountNumber" as the profileSearchKey and your reference number as the profileSearchValue.

The total size of Customer Profiles contact attributes is limited to 14,000 characters for the entire flow, which includes all values persisted as Response fields in Customer Profiles blocks.
Sources
Search for a customer profile in the agent workspace - Amazon Connect
List of available contact attributes in Amazon Connect and their JSONPath references - Amazon Connect
GetCustomerProfile - Amazon Connect

answered a year ago
AWS
SUPPORT ENGINEER
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.