related_items
Creates, updates, deletes, gets or lists a related_items resource.
Overview
| Name | related_items |
| Type | Resource |
| Id | aws.connectcases.related_items |
Fields
The following fields are returned by SELECT queries:
- search_related_items
| Name | Datatype | Description |
|---|---|---|
association_time | string (date-time) | Time at which a related item was associated with a case. |
content | object | Represents the content of a particular type of related item. |
performed_by | object | Represents the entity that performed the action. |
related_item_id | string | Unique identifier of a related item. |
tags | object | A 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_ | string | Type of a related item. (Contact, Comment, File, Sla, ConnectCase, Custom) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_related_items | select | domain_id, case_id, region | Searches 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_item | insert | domain_id, case_id, region, type, content | 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. | |
update_related_item | update | domain_id, case_id, related_item_id, region, content | 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. | |
delete_related_item | delete | domain_id, case_id, related_item_id, region | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
case_id | string | A unique identifier of the case. |
domain_id | string | A unique identifier of the Cases domain. |
region | string | AWS region (default: us-east-1) |
related_item_id | string | A unique identifier of a related item. |
SELECT examples
- search_related_items
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
- create_related_item
- Manifest
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
;
# Description fields are for documentation purposes
- name: related_items
props:
- name: domain_id
value: "{{ domain_id }}"
description: Required parameter for the related_items resource.
- name: case_id
value: "{{ case_id }}"
description: Required parameter for the related_items resource.
- name: region
value: "{{ region }}"
description: Required parameter for the related_items resource.
- name: type
value: "{{ type }}"
valid_values: ['Contact', 'Comment', 'File', 'Sla', 'ConnectCase', 'Custom']
- name: content
description: |
Represents the content of a related item to be created.
value:
contact:
contactArn: "{{ contactArn }}"
comment:
body: "{{ body }}"
contentType: "{{ contentType }}"
file:
fileArn: "{{ fileArn }}"
sla:
slaInputConfiguration:
name: "{{ name }}"
type_: "{{ type_ }}"
fieldId: "{{ fieldId }}"
targetFieldValues:
- stringValue: "{{ stringValue }}"
doubleValue: {{ doubleValue }}
booleanValue: {{ booleanValue }}
emptyValue: "{{ emptyValue }}"
userArnValue: "{{ userArnValue }}"
targetSlaMinutes: {{ targetSlaMinutes }}
connectCase:
caseId: "{{ caseId }}"
custom:
fields:
- id: "{{ id }}"
value:
stringValue: "{{ stringValue }}"
doubleValue: {{ doubleValue }}
booleanValue: {{ booleanValue }}
emptyValue: "{{ emptyValue }}"
userArnValue: "{{ userArnValue }}"
- name: performedBy
description: |
Represents the entity that performed the action.
value:
userArn: "{{ userArn }}"
customEntity: "{{ customEntity }}"
UPDATE examples
- update_related_item
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
- delete_related_item
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
;