start_merge_cases
async
¶
start_merge_cases(
domain_id: DomainId,
case_id: CaseId,
secondary_case_ids: CaseIdList,
*,
config_overrides: Optional[AsyncConnectCasesClientConfig] = None,
fields_configuration: Optional[FieldsConfigurationList] = None,
related_items_configuration: Optional[RelatedItemsConfiguration] = None,
performed_by: Optional[UserUnion] = None,
) -> StartMergeCasesResponse
Merges a secondary case into a primary case. The primary case, which you specify in the request URI, remains active. Both cases must belong to the same domain.
The merge runs asynchronously. To track its progress, call GetMergeCasesStatus. When the merge finishes, the selected field values and related items from the secondary case are on the primary case, the two cases are linked, and the secondary case is closed. Both cases record the merge in their audit history. For more information, see GetCaseAuditEvents.
Important things to know
-
Both cases must have the same customer, or at least one of them must have no customer.
-
While the merge runs, you can't modify the secondary case or its related items, and you can't delete the primary case. These requests return a
ConflictException. -
After the merge, the secondary case can be reopened, updated, and deleted, but it can't be merged again.
The request fails with a ValidationException, and no merge starts, if:
-
The primary case and the secondary case are the same case.
-
Either case is closed.
-
Both cases have a customer, and the customers are different.
-
fieldsConfigurationselects a field that can't be merged, or a field that the secondary case doesn't have. -
After the merge, the primary case would have more than 500 field values, or would exceed the maximum case size.
The request fails with a ServiceQuotaExceededException if, after the merge, either case would exceed the quota for related items per case. For the primary case, the count is its existing related items, plus the related items moved from the secondary case, plus the new case link. See Connect Customer Cases quotas.
The request fails with a ConflictException if either case is already part of a merge that is running, or was previously merged into another case as the secondary case.
Endpoints: See Connect Customer endpoints and quotas.
Parameters:
-
domain_id(DomainId) –The unique identifier of the Cases domain.
-
case_id(CaseId) –The unique identifier of the primary case. The primary case remains active and receives the merged field values and related items. The cases can use different templates, and the primary case keeps its template.
-
secondary_case_ids(CaseIdList) –The unique identifier of the secondary case to merge into the primary case. The secondary case is closed when the merge finishes. Specify exactly one case ID.
-
fields_configuration(Optional[FieldsConfigurationList], default:None) –The fields whose values to take from the secondary case. You can only merge custom fields and the following system fields:
assigned_queue,assigned_user,summary, andcase_reason. If you select any other system field, the request fails with aValidationException.For each field that can be merged, the merge works as follows:
-
If you select the field, the primary case gets the secondary case's value. If the secondary case's value is empty, the primary case's value is cleared.
-
If you don't select the field and the primary case has a value for it, the primary case keeps its value.
-
If you don't select the field and the primary case doesn't have the field, or its value is empty, the primary case gets the secondary case's value. This applies even when the field isn't on the primary case's template.
Field values are read from both cases when the merge runs, so changes that you make to the primary case after you start the merge are taken into account.
Specify at most one entry, and set its
sourceCaseIdto the secondary case ID. -
-
related_items_configuration(Optional[RelatedItemsConfiguration], default:None) –The types of related items to move from the secondary case to the primary case. Related items of a type that you don't select, or set to
false, stay on the closed secondary case. If you omit this parameter, no related items are moved.File, SLA, and work plan related items are never moved. They stay on the secondary case.
-
performed_by(Optional[UserUnion], default:None) –The user who performed the merge. If you provide
userArn, you must also have DescribeUser permission on the ARN of that user.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–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–We couldn't process your request because of an issue with the server. Try again later.
-
ResourceNotFoundException–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–The service quota has been exceeded. For a list of service quotas, see Connect Customer Service Quotas in the Connect Customer Administrator Guide.
-
ThrottlingException–The rate has been exceeded for this API. Please try again after a few minutes.
-
ValidationException–The request isn't valid. Check the syntax and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connectcases/_services/async_connect_cases.py
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 | |