Skip to main content

related_items

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

Overview

Namerelated_items
TypeResource
Idaws.connectcases.related_items

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
association_timestring (date-time)Time at which a related item was associated with a case.
contentobjectRepresents the content of a particular type of related item.
performed_byobjectRepresents the entity that performed the action.
related_item_idstringUnique identifier of a related item.
tagsobjectA map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.
type_stringType of a related item. (Contact, Comment, File, Sla, ConnectCase, Custom)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
search_related_itemsselectdomain_id, case_id, regionSearches for related items that are associated with a case. If no filters are provided, this returns all related items associated with a case.
create_related_iteminsertdomain_id, case_id, region, type, contentCreates a related item (comments, tasks, and contacts) and associates it with a case. There's a quota for the number of fields allowed in a Custom type related item. See Amazon Connect Cases quotas. Use cases Following are examples of related items that you may want to associate with a case: Related contacts, such as calls, chats, emails tasks Comments, for agent notes SLAs, to capture target resolution goals Cases, to capture related Amazon Connect Cases Files, such as policy documentation or customer-provided attachments Custom related items, which provide flexibility for you to define related items that such as bookings, orders, products, notices, and more Important things to know If you are associating a contact to a case by passing in Contact for a type, you must have DescribeContact permission on the ARN of the contact that you provide in content.contact.contactArn. A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a contactArn). All Related Items have their own internal identifier, the relatedItemArn. Examples of related items include comments and contacts. If you provide a value for performedBy.userArn you must also have DescribeUser permission on the ARN of the user that you provide. The type field is reserved for internal use only. Endpoints: See Amazon Connect endpoints and quotas.
update_related_itemupdatedomain_id, case_id, related_item_id, region, contentUpdates the content of a related item associated with a case. The following related item types are supported: Comment - Update the text content of an existing comment Custom - Update the fields of a custom related item. You can add, modify, and remove fields from a custom related item. There's a quota for the number of fields allowed in a Custom type related item. See Amazon Connect Cases quotas. Important things to know When updating a Custom related item, all existing and new fields, and their associated values should be included in the request. Fields not included as part of this request will be removed. If you provide a value for performedBy.userArn you must also have DescribeUser permission on the ARN of the user that you provide. System case fields cannot be used in a custom related item. Endpoints: See Amazon Connect endpoints and quotas.
delete_related_itemdeletedomain_id, case_id, related_item_id, regionDeletes the related item resource under a case. This API cannot be used on a FILE type related attachment. To delete this type of file, use the DeleteAttachedFile API

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
case_idstringA unique identifier of the case.
domain_idstringA unique identifier of the Cases domain.
regionstringAWS region (default: us-east-1)

SELECT examples

Searches for related items that are associated with a case. If no filters are provided, this returns all related items associated with a case.

SELECT
association_time,
content,
performed_by,
related_item_id,
tags,
type_
FROM aws.connectcases.related_items
WHERE domain_id = '{{ domain_id }}' -- required
AND case_id = '{{ case_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a related item (comments, tasks, and contacts) and associates it with a case. There's a quota for the number of fields allowed in a Custom type related item. See Amazon Connect Cases quotas. Use cases Following are examples of related items that you may want to associate with a case: Related contacts, such as calls, chats, emails tasks Comments, for agent notes SLAs, to capture target resolution goals Cases, to capture related Amazon Connect Cases Files, such as policy documentation or customer-provided attachments Custom related items, which provide flexibility for you to define related items that such as bookings, orders, products, notices, and more Important things to know If you are associating a contact to a case by passing in Contact for a type, you must have DescribeContact permission on the ARN of the contact that you provide in content.contact.contactArn. A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a contactArn). All Related Items have their own internal identifier, the relatedItemArn. Examples of related items include comments and contacts. If you provide a value for performedBy.userArn you must also have DescribeUser permission on the ARN of the user that you provide. The type field is reserved for internal use only. Endpoints: See Amazon Connect endpoints and quotas.

INSERT INTO aws.connectcases.related_items (
type,
content,
performedBy,
domain_id,
case_id,
region
)
SELECT
'{{ type }}' /* required */,
'{{ content }}' /* required */,
'{{ performedBy }}',
'{{ domain_id }}',
'{{ case_id }}',
'{{ region }}'
RETURNING
related_item_arn,
related_item_id
;

UPDATE examples

Updates the content of a related item associated with a case. The following related item types are supported: Comment - Update the text content of an existing comment Custom - Update the fields of a custom related item. You can add, modify, and remove fields from a custom related item. There's a quota for the number of fields allowed in a Custom type related item. See Amazon Connect Cases quotas. Important things to know When updating a Custom related item, all existing and new fields, and their associated values should be included in the request. Fields not included as part of this request will be removed. If you provide a value for performedBy.userArn you must also have DescribeUser permission on the ARN of the user that you provide. System case fields cannot be used in a custom related item. Endpoints: See Amazon Connect endpoints and quotas.

UPDATE aws.connectcases.related_items
SET
content = '{{ content }}',
performedBy = '{{ performedBy }}'
WHERE
domain_id = '{{ domain_id }}' --required
AND case_id = '{{ case_id }}' --required
AND related_item_id = '{{ related_item_id }}' --required
AND region = '{{ region }}' --required
AND content = '{{ content }}' --required
RETURNING
association_time,
content,
created_by,
last_updated_user,
related_item_arn,
related_item_id,
tags,
type_;

DELETE examples

Deletes the related item resource under a case. This API cannot be used on a FILE type related attachment. To delete this type of file, use the DeleteAttachedFile API

DELETE FROM aws.connectcases.related_items
WHERE domain_id = '{{ domain_id }}' --required
AND case_id = '{{ case_id }}' --required
AND related_item_id = '{{ related_item_id }}' --required
AND region = '{{ region }}' --required
;