create_contact
¶
create_contact(
instance_id: InstanceId,
channel: Channel,
initiation_method: ContactInitiationMethod,
*,
config_overrides: Optional[ConnectClientConfig] = None,
client_token: Optional[ClientToken] = None,
related_contact_id: Optional[ContactId] = None,
attributes: Optional[Attributes] = None,
references: Optional[ContactReferences] = None,
expiry_duration_in_minutes: Optional[ExpiryDurationInMinutes] = None,
user_info: Optional[UserInfo] = None,
initiate_as: Optional[InitiateAs] = None,
name: Optional[Name] = None,
description: Optional[Description] = None,
segment_attributes: Optional[SegmentAttributes] = None,
previous_contact_id: Optional[ContactId] = None,
) -> CreateContactResponse
Only the VOICE, EMAIL, and TASK channels are supported. For VOICE: The supported initiation method is For EMAIL: The supported initiation methods are For TASK: The supported initiation method is
TRANSFER. The contacts created with this initiation method have a subtype connect:ExternalAudio. OUTBOUND, AGENT_REPLY, and FLOW. API. Contacts created with this API have a sub-type of connect:ExternalTask.
Creates a new VOICE, EMAIL, or TASK contact.
After a contact is created, you can move it to the desired state by using the InitiateAs parameter. While you can use API to create task contacts that are in the COMPLETED state, you must contact Amazon Web Services Support before using it for bulk import use cases. Bulk import causes your requests to be throttled or fail if your CreateContact limits aren't high enough.
Parameters:
-
instance_id(InstanceId) –The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
-
related_contact_id(Optional[ContactId], default:None) –The identifier of the contact in this instance of Connect Customer.
-
attributes(Optional[Attributes], default:None) –A custom key-value pair using an attribute map. The attributes are standard Connect Customer attributes, and can be accessed in flows just like any other contact attributes.
There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.
-
references(Optional[ContactReferences], default:None) –A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation:
URL|NUMBER|STRING|DATE|EMAIL|ATTACHMENT. -
channel(Channel) –The channel for the contact.
The CHAT channel is not supported. The following information is incorrect. We're working to correct it.
-
initiation_method(ContactInitiationMethod) –Indicates how the contact was initiated.
CreateContact only supports the following initiation methods. Valid values by channel are:
-
For VOICE:
TRANSFERand the subtypeconnect:ExternalAudio -
For EMAIL:
OUTBOUND|AGENT_REPLY|FLOW -
For TASK:
API
The other channels listed below are incorrect. We're working to correct this information.
-
-
expiry_duration_in_minutes(Optional[ExpiryDurationInMinutes], default:None) –Number of minutes the contact will be active for before expiring
-
user_info(Optional[UserInfo], default:None) –User details for the contact
UserInfo is required when creating an EMAIL contact with
OUTBOUNDandAGENT_REPLYcontact initiation methods. -
initiate_as(Optional[InitiateAs], default:None) –Initial state of the contact when it's created. Only TASK channel contacts can be initiated with
COMPLETEDstate. -
name(Optional[Name], default:None) –The name of a the contact.
-
description(Optional[Description], default:None) –A description of the contact.
-
segment_attributes(Optional[SegmentAttributes], default:None) –A set of system defined key-value pairs stored on individual contact segments (unique contact ID) using an attribute map. The attributes are standard Connect Customer attributes. They can be accessed in flows.
Attribute keys can include only alphanumeric, -, and _.
This field can be used to set Segment Contact Expiry as a duration in minutes.
To set contact expiry, a ValueMap must be specified containing the integer number of minutes the contact will be active for before expiring, with
SegmentAttributeslike {"connect:ContactExpiry": {"ValueMap" : { "ExpiryDuration": { "ValueInteger": 135}}}}. -
previous_contact_id(Optional[ContactId], default:None) –The ID of the previous contact when creating a transfer contact. This value can be provided only for external audio contacts. For more information, see Integrate Connect Customer Contact Lens with external voice systems in the Connect Customer Administrator Guide.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ConflictException–Operation cannot be performed at this time as there is a conflict with another operation or contact state.
-
IdempotencyException–An entity with the same name already exists.
-
InternalServiceException–Request processing failed because of an error or failure with the service.
-
InvalidParameterException–One or more of the specified parameters are not valid.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource was not found.
-
ServiceQuotaExceededException–The service quota has been exceeded.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connect/_services/connect.py
3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 | |