Skip to main content

users

Creates, updates, deletes, gets or lists a users resource.

Overview

Nameusers
TypeResource
Idaws.connect.users

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
after_contact_work_configsarrayA list of after contact work (ACW) timeout configuration settings for each channel.
arnstringThe Amazon Resource Name (ARN) of the user account.
auto_accept_configsarrayA list of auto-accept configuration settings for each channel.
directory_user_idstringThe identifier of the user account in the directory used for identity management.
hierarchy_group_idstringThe identifier of the hierarchy group for the user.
idstringThe identifier of the user account.
identity_infoobjectContains information about the identity of a user. For Connect Customer instances that are created with the EXISTING_DIRECTORY identity management type, FirstName, LastName, and Email cannot be updated from within Connect Customer because they are managed by the directory. The FirstName and LastName length constraints below apply only to instances using SAML for identity management. If you are using Connect Customer for identity management, the length constraints are 1-255 for FirstName, and 1-256 for LastName.
last_modified_regionstringThe Amazon Web Services Region where this resource was last modified. (pattern: <code>[a-z]{2}(-[a-z]+){1,2}(-[0-9])?</code>)
last_modified_timestring (date-time)The timestamp when this resource was last modified.
persistent_connection_configsarrayThe list of persistent connection configuration settings for each channel.
phone_configobjectContains information about the phone configuration settings for a user.
phone_number_configsarrayThe list of phone number configuration settings for each channel.
routing_profile_idstringThe identifier of the routing profile for the user.
security_profile_idsarrayThe identifiers of the security profiles for the user.
tagsobjectThe tags.
usernamestringThe user name assigned to the user account.
voice_enhancement_configsarrayThe list of voice enhancement configuration settings for each channel.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_userselectuser_id, instance_id, regionDescribes the specified user. You can find the instance ID in the Connect Customer console (it’s the final part of the ARN). The console does not display the user IDs. Instead, list the users and note the IDs provided in the output.
list_usersselectinstance_id, regionnextToken, maxResultsProvides summary information about the users for the specified Connect Customer instance.
search_usersselectregionSearches users in an Connect Customer instance, with optional filtering. AfterContactWorkTimeLimit is returned in milliseconds.
create_userinsertinstance_id, region, SecurityProfileIds, RoutingProfileIdCreates a user account for the specified Connect Customer instance. Certain UserIdentityInfo parameters are required in some situations. For example, Email, FirstName and LastName are required if you are using Connect Customer or SAML for identity management. Fields in PhoneConfig cannot be set simultaneously with their corresponding channel-specific configuration parameters. Specifically: PhoneConfig.AutoAccept conflicts with AutoAcceptConfigs PhoneConfig.AfterContactWorkTimeLimit conflicts with AfterContactWorkConfigs PhoneConfig.PhoneType and PhoneConfig.PhoneNumber conflict with PhoneNumberConfigs PhoneConfig.PersistentConnection conflicts with PersistentConnectionConfigs We recommend using channel-specific parameters such as AutoAcceptConfigs, AfterContactWorkConfigs, PhoneNumberConfigs, PersistentConnectionConfigs, and VoiceEnhancementConfigs for per-channel configuration. For information about how to create users using the Connect Customer admin website, see Add Users in the Connect Customer Administrator Guide.
associate_contact_with_userupdateinstance_id, contact_id, region, UserIdAssociates a queued contact with an agent. Use cases Following are common uses cases for this API: Programmatically assign queued contacts to available users. Leverage the IAM context key connect:PreferredUserArn to restrict contact association to specific preferred user. Important things to know Use this API with chat, email, task, and voice contacts. For voice callbacks, this API does not support customer-first mode. This API can be used to offer a contact to an agent even if the agent is currently at maximum concurrency for the channel. Use it to associate contacts with users regardless of their current state, including custom states. Ensure your application logic accounts for user availability before making associations. It honors the IAM context key connect:PreferredUserArn to prevent unauthorized contact associations. It respects the IAM context key connect:PreferredUserArn to enforce authorization controls and prevent unauthorized contact associations. Verify that your IAM policies are properly configured to support your intended use cases. The service quota Queues per routing profile per instance applies to manually assigned queues, too. For more information about this quota, see Connect Customer quotas in the Connect Customer Administrator Guide. Endpoints: See Connect Customer endpoints and quotas.
update_user_identity_infoupdateuser_id, instance_id, region, IdentityInfoUpdates the identity information for the specified user. We strongly recommend limiting who has the ability to invoke UpdateUserIdentityInfo. Someone with that ability can change the login credentials of other users by changing their email address. This poses a security risk to your organization. They can change the email address of a user to the attacker's email address, and then reset the password through email. For more information, see Best Practices for Security Profiles in the Connect Customer Administrator Guide.
update_user_phone_configupdateuser_id, instance_id, region, PhoneConfigUpdates the phone configuration settings for the specified user. We recommend using the UpdateUserConfig API, which supports additional functionality that is not available in the UpdateUserPhoneConfig API, such as voice enhancement settings and per-channel configuration for auto-accept and After Contact Work (ACW) timeouts. In comparison, the UpdateUserPhoneConfig API will always set the same ACW timeouts to all channels the user handles.
update_user_configupdateuser_id, instance_id, regionUpdates the configuration settings for the specified user, including per-channel auto-accept and after contact work (ACW) timeout settings. This operation replaces the UpdateUserPhoneConfig API. While UpdateUserPhoneConfig applies the same ACW timeout to all channels, UpdateUserConfig allows you to set different auto-accept and ACW timeout values for each channel type.
put_user_statusreplaceuser_id, instance_id, region, AgentStatusIdChanges the current status of a user or agent in Connect Customer. If the agent is currently handling a contact, this sets the agent's next status. For more information, see Agent status and Set your next status in the Connect Customer Administrator Guide.
delete_userdeleteinstance_id, user_id, regionDeletes a user account from the specified Connect Customer instance. For information about what happens to a user's data when their account is deleted, see Delete Users from Your Connect Customer Instance in the Connect Customer Administrator Guide. After calling DeleteUser, call DeleteQuickConnect to delete any records related to the deleted users. This will help you: Avoid dangling resources that impact your service quotas. Remove deleted users so they don't appear to agents as transfer options. Avoid the disruption of other Connect Customer processes, such as instance replication and syncing if you're using Connect Customer Global Resiliency.
update_user_hierarchyexecuser_id, instance_id, regionAssigns the specified hierarchy group to the specified user.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
contact_idstringThe identifier of the contact in this instance of Connect Customer.
instance_idstringThe identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
regionstringAWS region (default: us-east-1)
user_idstringThe identifier of the user account.
maxResultsintegerThe maximum number of results to return per page. The default MaxResult size is 100.
nextTokenstringThe token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

SELECT examples

Describes the specified user. You can find the instance ID in the Connect Customer console (it’s the final part of the ARN). The console does not display the user IDs. Instead, list the users and note the IDs provided in the output.

SELECT
after_contact_work_configs,
arn,
auto_accept_configs,
directory_user_id,
hierarchy_group_id,
id,
identity_info,
last_modified_region,
last_modified_time,
persistent_connection_configs,
phone_config,
phone_number_configs,
routing_profile_id,
security_profile_ids,
tags,
username,
voice_enhancement_configs
FROM aws.connect.users
WHERE user_id = '{{ user_id }}' -- required
AND instance_id = '{{ instance_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a user account for the specified Connect Customer instance. Certain UserIdentityInfo parameters are required in some situations. For example, Email, FirstName and LastName are required if you are using Connect Customer or SAML for identity management. Fields in PhoneConfig cannot be set simultaneously with their corresponding channel-specific configuration parameters. Specifically: PhoneConfig.AutoAccept conflicts with AutoAcceptConfigs PhoneConfig.AfterContactWorkTimeLimit conflicts with AfterContactWorkConfigs PhoneConfig.PhoneType and PhoneConfig.PhoneNumber conflict with PhoneNumberConfigs PhoneConfig.PersistentConnection conflicts with PersistentConnectionConfigs We recommend using channel-specific parameters such as AutoAcceptConfigs, AfterContactWorkConfigs, PhoneNumberConfigs, PersistentConnectionConfigs, and VoiceEnhancementConfigs for per-channel configuration. For information about how to create users using the Connect Customer admin website, see Add Users in the Connect Customer Administrator Guide.

INSERT INTO aws.connect.users (
Username,
Password,
IdentityInfo,
PhoneConfig,
DirectoryUserId,
SecurityProfileIds,
RoutingProfileId,
HierarchyGroupId,
AutoAcceptConfigs,
AfterContactWorkConfigs,
PhoneNumberConfigs,
PersistentConnectionConfigs,
VoiceEnhancementConfigs,
Tags,
instance_id,
region
)
SELECT
'{{ Username }}',
'{{ Password }}',
'{{ IdentityInfo }}',
'{{ PhoneConfig }}',
'{{ DirectoryUserId }}',
'{{ SecurityProfileIds }}' /* required */,
'{{ RoutingProfileId }}' /* required */,
'{{ HierarchyGroupId }}',
'{{ AutoAcceptConfigs }}',
'{{ AfterContactWorkConfigs }}',
'{{ PhoneNumberConfigs }}',
'{{ PersistentConnectionConfigs }}',
'{{ VoiceEnhancementConfigs }}',
'{{ Tags }}',
'{{ instance_id }}',
'{{ region }}'
RETURNING
user_arn,
user_id
;

UPDATE examples

Associates a queued contact with an agent. Use cases Following are common uses cases for this API: Programmatically assign queued contacts to available users. Leverage the IAM context key connect:PreferredUserArn to restrict contact association to specific preferred user. Important things to know Use this API with chat, email, task, and voice contacts. For voice callbacks, this API does not support customer-first mode. This API can be used to offer a contact to an agent even if the agent is currently at maximum concurrency for the channel. Use it to associate contacts with users regardless of their current state, including custom states. Ensure your application logic accounts for user availability before making associations. It honors the IAM context key connect:PreferredUserArn to prevent unauthorized contact associations. It respects the IAM context key connect:PreferredUserArn to enforce authorization controls and prevent unauthorized contact associations. Verify that your IAM policies are properly configured to support your intended use cases. The service quota Queues per routing profile per instance applies to manually assigned queues, too. For more information about this quota, see Connect Customer quotas in the Connect Customer Administrator Guide. Endpoints: See Connect Customer endpoints and quotas.

UPDATE aws.connect.users
SET
UserId = '{{ UserId }}'
WHERE
instance_id = '{{ instance_id }}' --required
AND contact_id = '{{ contact_id }}' --required
AND region = '{{ region }}' --required
AND UserId = '{{ UserId }}' --required;

REPLACE examples

Changes the current status of a user or agent in Connect Customer. If the agent is currently handling a contact, this sets the agent's next status. For more information, see Agent status and Set your next status in the Connect Customer Administrator Guide.

REPLACE aws.connect.users
SET
AgentStatusId = '{{ AgentStatusId }}'
WHERE
user_id = '{{ user_id }}' --required
AND instance_id = '{{ instance_id }}' --required
AND region = '{{ region }}' --required
AND AgentStatusId = '{{ AgentStatusId }}' --required;

DELETE examples

Deletes a user account from the specified Connect Customer instance. For information about what happens to a user's data when their account is deleted, see Delete Users from Your Connect Customer Instance in the Connect Customer Administrator Guide. After calling DeleteUser, call DeleteQuickConnect to delete any records related to the deleted users. This will help you: Avoid dangling resources that impact your service quotas. Remove deleted users so they don't appear to agents as transfer options. Avoid the disruption of other Connect Customer processes, such as instance replication and syncing if you're using Connect Customer Global Resiliency.

DELETE FROM aws.connect.users
WHERE instance_id = '{{ instance_id }}' --required
AND user_id = '{{ user_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Assigns the specified hierarchy group to the specified user.

EXEC aws.connect.users.update_user_hierarchy
@user_id='{{ user_id }}' --required,
@instance_id='{{ instance_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"HierarchyGroupId": "{{ HierarchyGroupId }}"
}'
;