DeleteFieldCommand

Deletes a field from a cases template. You can delete up to 100 fields per domain.

After a field is deleted:

  • You can still retrieve the field by calling BatchGetField.

  • You cannot update a deleted field by calling UpdateField; it throws a ValidationException.

  • Deleted fields are not included in the ListFields response.

  • Calling CreateCase with a deleted field throws a ValidationException denoting which field IDs in the request have been deleted.

  • Calling GetCase with a deleted field ID returns the deleted field's value if one exists.

  • Calling UpdateCase with a deleted field ID throws a ValidationException if the case does not already contain a value for the deleted field. Otherwise it succeeds, allowing you to update or remove (using emptyValue: {}) the field's value from the case.

  • GetTemplate does not return field IDs for deleted fields.

  • GetLayout does not return field IDs for deleted fields.

  • Calling SearchCases with the deleted field ID as a filter returns any cases that have a value for the deleted field that matches the filter criteria.

  • Calling SearchCases with a searchTerm value that matches a deleted field's value on a case returns the case in the response.

  • Calling BatchPutFieldOptions with a deleted field ID throw a ValidationException.

  • Calling GetCaseEventConfiguration does not return field IDs for deleted fields.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ConnectCasesClient, DeleteFieldCommand } from "@aws-sdk/client-connectcases"; // ES Modules import
// const { ConnectCasesClient, DeleteFieldCommand } = require("@aws-sdk/client-connectcases"); // CommonJS import
const client = new ConnectCasesClient(config);
const input = { // DeleteFieldRequest
  domainId: "STRING_VALUE", // required
  fieldId: "STRING_VALUE", // required
};
const command = new DeleteFieldCommand(input);
const response = await client.send(command);
// {};

DeleteFieldCommand Input

See DeleteFieldCommandInput for more details

Parameter
Type
Description
domainId
Required
string | undefined

The unique identifier of the Cases domain.

fieldId
Required
string | undefined

Unique identifier of the field.

DeleteFieldCommand Output

See DeleteFieldCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ConflictException
client

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. See the accompanying error message for details.

InternalServerException
server

We couldn't process your request because of an issue with the server. Try again later.

ResourceNotFoundException
client

We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again.

ServiceQuotaExceededException
client

The service quota has been exceeded. For a list of service quotas, see Amazon Connect Service Quotas  in the Amazon Connect Administrator Guide.

ThrottlingException
client

The rate has been exceeded for this API. Please try again after a few minutes.

ValidationException
client

The request isn't valid. Check the syntax and try again.

ConnectCasesServiceException
Base exception class for all service exceptions from ConnectCases service.