Skip to content

How can I update Amazon Connect user proficiency attribute values via Lambda?

0

Hello AWS team,

I’m building a use case using Amazon Connect user proficiencies to manage agent skill routing for multiple companies. I’ve created predefined attributes like CompanyA, CompanyB, etc., with values such as "enable" and "disable".

The goal is to let agents dynamically select which companies they will support before signing in (via a web interface), and update their associated proficiencies using a Lambda function.

  • The proficiencies already exist for each agent and look like: { "AttributeName": "CompanyA", "AttributeValue": "enable", "Level": 1 }

However, when I try to update the AttributeValue from "enable" to "disable" using UpdateUserProficiencies in Lambda, I get: ResourceNotFoundException: A user proficiency with the name CompanyA and value disable does not exist for the user

My understanding was that I could modify the value of an existing attribute (e.g., from "enable" to "disable"), but it seems Amazon Connect only accepts exact matches already assigned.

Question: Is it possible to dynamically change the AttributeValue of a user proficiency (e.g., from "enable" to "disable") via Lambda?

If not, what is the recommended way to allow users to toggle proficiencies on/off via an external application (like a web UI) before login?

Thanks in advance!

asked a year ago295 views

1 Answer
0
Accepted Answer

Unfortunately, it's not possible to directly change the AttributeValue of an existing user proficiency from "enable" to "disable" using the UpdateUserProficiencies API in Lambda. The API requires that the proficiency with the exact AttributeName and AttributeValue combination already exists for the user.

To achieve your goal of allowing agents to dynamically select which companies they will support before signing in, you'll need to take a different approach. Here's a recommended way to implement this functionality:

  1. Pre-associate both "enable" and "disable" proficiencies for each company to all agents. For example: { "AttributeName": "CompanyA", "AttributeValue": "enable", "Level": 1 }, { "AttributeName": "CompanyA", "AttributeValue": "disable", "Level": 1 }

  2. When an agent wants to toggle their support for a company, use the UpdateUserProficiencies API to update the Level of the corresponding proficiency. For example:

    • To enable support for CompanyA: Set the "enable" proficiency to Level 1 and the "disable" proficiency to Level 0.
    • To disable support for CompanyA: Set the "enable" proficiency to Level 0 and the "disable" proficiency to Level 1.
  3. In your routing logic, check for proficiencies with Level 1 to determine which companies an agent is currently supporting.

This approach allows you to effectively toggle proficiencies on and off via an external application like a web UI before login, while working within the constraints of the UpdateUserProficiencies API.

Remember to handle error cases and ensure proper security measures are in place when allowing external applications to modify user proficiencies.

Sources
UpdateUserProficiencies - Amazon Connect

answered a year ago

EXPERT

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.