updatePredefinedAttribute method

Future<void> updatePredefinedAttribute({
  1. required String instanceId,
  2. required String name,
  3. InputPredefinedAttributeConfiguration? attributeConfiguration,
  4. List<String>? purposes,
  5. PredefinedAttributeValues? values,
})

Updates a predefined attribute for the specified Connect Customer instance. A predefined attribute is made up of a name and a value.

For the predefined attributes per instance quota, see Connect Customer quotas.

Use cases

Following are common uses cases for this API:

  • Update routing proficiency (for example, agent certification) that has predefined values (for example, a list of possible certifications). For more information, see Create predefined attributes for routing contacts to agents.
  • Update an attribute for business unit name that has a list of predefined business unit names used in your organization. This is a use case where information for a contact varies between transfers or conferences. For more information, see Use contact segment attributes.
Endpoints: See Connect Customer endpoints and quotas.

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

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 name : The name of the predefined attribute.

Parameter attributeConfiguration : Custom metadata that is associated to predefined attributes to control behavior in upstream services, such as controlling how a predefined attribute should be displayed in the Connect Customer admin website.

Parameter purposes : Values that enable you to categorize your predefined attributes. You can use them in custom UI elements across the Connect Customer admin website.

Parameter values : The values of the predefined attribute.

Implementation

Future<void> updatePredefinedAttribute({
  required String instanceId,
  required String name,
  InputPredefinedAttributeConfiguration? attributeConfiguration,
  List<String>? purposes,
  PredefinedAttributeValues? values,
}) async {
  final $payload = <String, dynamic>{
    if (attributeConfiguration != null)
      'AttributeConfiguration': attributeConfiguration,
    if (purposes != null) 'Purposes': purposes,
    if (values != null) 'Values': values,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/predefined-attributes/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
}