putUserStatus method

Future<void> putUserStatus({
  1. required String agentStatusId,
  2. required String instanceId,
  3. required String userId,
})

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.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter agentStatusId : The identifier of the agent status.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter userId : The identifier of the user.

Implementation

Future<void> putUserStatus({
  required String agentStatusId,
  required String instanceId,
  required String userId,
}) async {
  final $payload = <String, dynamic>{
    'AgentStatusId': agentStatusId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/users/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(userId)}/status',
    exceptionFnMap: _exceptionFns,
  );
}