Skip to content

Commit 54f160e

Browse files
author
awstools
committed
feat(client-connect): Amazon Connect introduces StartOutboundChatContact API allowing customers to initiate outbound chat contacts
1 parent 2491872 commit 54f160e

17 files changed

+603
-40
lines changed

clients/client-connect/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,14 @@ StartContactStreaming
17851785

17861786
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/StartContactStreamingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartContactStreamingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartContactStreamingCommandOutput/)
17871787

1788+
</details>
1789+
<details>
1790+
<summary>
1791+
StartOutboundChatContact
1792+
</summary>
1793+
1794+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/StartOutboundChatContactCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartOutboundChatContactCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/StartOutboundChatContactCommandOutput/)
1795+
17881796
</details>
17891797
<details>
17901798
<summary>

clients/client-connect/src/Connect.ts

+23
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,11 @@ import {
913913
StartContactStreamingCommandInput,
914914
StartContactStreamingCommandOutput,
915915
} from "./commands/StartContactStreamingCommand";
916+
import {
917+
StartOutboundChatContactCommand,
918+
StartOutboundChatContactCommandInput,
919+
StartOutboundChatContactCommandOutput,
920+
} from "./commands/StartOutboundChatContactCommand";
916921
import {
917922
StartOutboundVoiceContactCommand,
918923
StartOutboundVoiceContactCommandInput,
@@ -1395,6 +1400,7 @@ const commands = {
13951400
StartContactEvaluationCommand,
13961401
StartContactRecordingCommand,
13971402
StartContactStreamingCommand,
1403+
StartOutboundChatContactCommand,
13981404
StartOutboundVoiceContactCommand,
13991405
StartTaskContactCommand,
14001406
StartWebRTCContactCommand,
@@ -4530,6 +4536,23 @@ export interface Connect {
45304536
cb: (err: any, data?: StartContactStreamingCommandOutput) => void
45314537
): void;
45324538

4539+
/**
4540+
* @see {@link StartOutboundChatContactCommand}
4541+
*/
4542+
startOutboundChatContact(
4543+
args: StartOutboundChatContactCommandInput,
4544+
options?: __HttpHandlerOptions
4545+
): Promise<StartOutboundChatContactCommandOutput>;
4546+
startOutboundChatContact(
4547+
args: StartOutboundChatContactCommandInput,
4548+
cb: (err: any, data?: StartOutboundChatContactCommandOutput) => void
4549+
): void;
4550+
startOutboundChatContact(
4551+
args: StartOutboundChatContactCommandInput,
4552+
options: __HttpHandlerOptions,
4553+
cb: (err: any, data?: StartOutboundChatContactCommandOutput) => void
4554+
): void;
4555+
45334556
/**
45344557
* @see {@link StartOutboundVoiceContactCommand}
45354558
*/

clients/client-connect/src/ConnectClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ import {
581581
StartContactStreamingCommandInput,
582582
StartContactStreamingCommandOutput,
583583
} from "./commands/StartContactStreamingCommand";
584+
import {
585+
StartOutboundChatContactCommandInput,
586+
StartOutboundChatContactCommandOutput,
587+
} from "./commands/StartOutboundChatContactCommand";
584588
import {
585589
StartOutboundVoiceContactCommandInput,
586590
StartOutboundVoiceContactCommandOutput,
@@ -977,6 +981,7 @@ export type ServiceInputTypes =
977981
| StartContactEvaluationCommandInput
978982
| StartContactRecordingCommandInput
979983
| StartContactStreamingCommandInput
984+
| StartOutboundChatContactCommandInput
980985
| StartOutboundVoiceContactCommandInput
981986
| StartTaskContactCommandInput
982987
| StartWebRTCContactCommandInput
@@ -1237,6 +1242,7 @@ export type ServiceOutputTypes =
12371242
| StartContactEvaluationCommandOutput
12381243
| StartContactRecordingCommandOutput
12391244
| StartContactStreamingCommandOutput
1245+
| StartOutboundChatContactCommandOutput
12401246
| StartOutboundVoiceContactCommandOutput
12411247
| StartTaskContactCommandOutput
12421248
| StartWebRTCContactCommandOutput

clients/client-connect/src/commands/AssociateAnalyticsDataSetCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export interface AssociateAnalyticsDataSetCommandInput extends AssociateAnalytic
2828
export interface AssociateAnalyticsDataSetCommandOutput extends AssociateAnalyticsDataSetResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
32-
* <p>Associates the specified dataset for a Amazon Connect instance with the target account.
31+
* <p>Associates the specified dataset for a Amazon Connect instance with the target account.
3332
* You can associate only one dataset in a single call.</p>
3433
* @example
3534
* Use a bare-bones client and the command you need to make an API call.

clients/client-connect/src/commands/BatchAssociateAnalyticsDataSetCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export interface BatchAssociateAnalyticsDataSetCommandOutput
3333
__MetadataBearer {}
3434

3535
/**
36-
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
37-
* <p>Associates a list of analytics datasets for a given Amazon Connect instance to a target
36+
* <p>Associates a list of analytics datasets for a given Amazon Connect instance to a target
3837
* account. You can associate multiple datasets in a single call.</p>
3938
* @example
4039
* Use a bare-bones client and the command you need to make an API call.

clients/client-connect/src/commands/BatchDisassociateAnalyticsDataSetCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ export interface BatchDisassociateAnalyticsDataSetCommandOutput
3636
__MetadataBearer {}
3737

3838
/**
39-
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
40-
* <p>Removes a list of analytics datasets associated with a given Amazon Connect instance.
39+
* <p>Removes a list of analytics datasets associated with a given Amazon Connect instance.
4140
* You can disassociate multiple datasets in a single call.</p>
4241
* @example
4342
* Use a bare-bones client and the command you need to make an API call.

clients/client-connect/src/commands/BatchPutContactCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ export interface BatchPutContactCommandOutput extends BatchPutContactResponse, _
4949
* ContactDataRequestList: [ // ContactDataRequestList // required
5050
* { // ContactDataRequest
5151
* SystemEndpoint: { // Endpoint
52-
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW",
52+
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
5353
* Address: "STRING_VALUE",
5454
* },
5555
* CustomerEndpoint: {
56-
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW",
56+
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
5757
* Address: "STRING_VALUE",
5858
* },
5959
* RequestIdentifier: "STRING_VALUE",

clients/client-connect/src/commands/DescribeContactCommand.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ export interface DescribeContactCommandOutput extends DescribeContactResponse, _
3232
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
3333
* <p>Describes the specified contact. </p>
3434
* <important>
35-
* <p>Contact information remains available in Amazon Connect for 24 months, and then it is
36-
* deleted.</p>
37-
* <p>Only data from November 12, 2021, and later is returned by this
38-
* API.</p>
35+
* <p>Contact information remains available in Amazon Connect for 24 months from the
36+
* InitiationTimestamp, and then it is deleted. Only contact information that is available in
37+
* Amazon Connect is returned by this API</p>
3938
* </important>
4039
* @example
4140
* Use a bare-bones client and the command you need to make an API call.

clients/client-connect/src/commands/DisassociateAnalyticsDataSetCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ export interface DisassociateAnalyticsDataSetCommandInput extends DisassociateAn
3131
export interface DisassociateAnalyticsDataSetCommandOutput extends __MetadataBearer {}
3232

3333
/**
34-
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
35-
* <p>Removes the dataset ID associated with a given Amazon Connect instance.</p>
34+
* <p>Removes the dataset ID associated with a given Amazon Connect instance.</p>
3635
* @example
3736
* Use a bare-bones client and the command you need to make an API call.
3837
* ```javascript

clients/client-connect/src/commands/ListAnalyticsDataAssociationsCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export interface ListAnalyticsDataAssociationsCommandOutput
3333
__MetadataBearer {}
3434

3535
/**
36-
* <p>This API is in preview release for Amazon Connect and is subject to change.</p>
37-
* <p>Lists the association status of requested dataset ID for a given Amazon Connect
36+
* <p>Lists the association status of requested dataset ID for a given Amazon Connect
3837
* instance.</p>
3938
* @example
4039
* Use a bare-bones client and the command you need to make an API call.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { StartOutboundChatContactRequest, StartOutboundChatContactResponse } from "../models/models_2";
10+
import { de_StartOutboundChatContactCommand, se_StartOutboundChatContactCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link StartOutboundChatContactCommand}.
21+
*/
22+
export interface StartOutboundChatContactCommandInput extends StartOutboundChatContactRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link StartOutboundChatContactCommand}.
27+
*/
28+
export interface StartOutboundChatContactCommandOutput extends StartOutboundChatContactResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Initiates a new outbound SMS contact to a customer. Response of this API provides the
32+
* ContactId of the outbound SMS contact created.</p>
33+
* <p>
34+
* <b>SourceEndpoint</b> only supports Endpoints with
35+
* <code>CONNECT_PHONENUMBER_ARN</code> as Type and <b>DestinationEndpoint</b> only supports Endpoints with <code>TELEPHONE_NUMBER</code> as
36+
* Type. <b>ContactFlowId</b> initiates the flow to manage the new SMS
37+
* contact created.</p>
38+
* <p>This API can be used to initiate outbound SMS contacts for an agent or it can also deflect
39+
* an ongoing contact to an outbound SMS contact by using the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundChatContact.html">StartOutboundChatContact</a> Flow Action.</p>
40+
* <p>For more information about using SMS in Amazon Connect, see the following topics in the
41+
* <i>Amazon Connect Administrator Guide</i>:</p>
42+
* <ul>
43+
* <li>
44+
* <p>
45+
* <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-sms-messaging.html">Set
46+
* up SMS messaging</a>
47+
* </p>
48+
* </li>
49+
* <li>
50+
* <p>
51+
* <a href="https://docs.aws.amazon.com/connect/latest/adminguide/sms-number.html">Request an
52+
* SMS-enabled phone number through AWS End User Messaging SMS</a>
53+
* </p>
54+
* </li>
55+
* </ul>
56+
* @example
57+
* Use a bare-bones client and the command you need to make an API call.
58+
* ```javascript
59+
* import { ConnectClient, StartOutboundChatContactCommand } from "@aws-sdk/client-connect"; // ES Modules import
60+
* // const { ConnectClient, StartOutboundChatContactCommand } = require("@aws-sdk/client-connect"); // CommonJS import
61+
* const client = new ConnectClient(config);
62+
* const input = { // StartOutboundChatContactRequest
63+
* SourceEndpoint: { // Endpoint
64+
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
65+
* Address: "STRING_VALUE",
66+
* },
67+
* DestinationEndpoint: {
68+
* Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN",
69+
* Address: "STRING_VALUE",
70+
* },
71+
* InstanceId: "STRING_VALUE", // required
72+
* SegmentAttributes: { // SegmentAttributes // required
73+
* "<keys>": { // SegmentAttributeValue
74+
* ValueString: "STRING_VALUE",
75+
* },
76+
* },
77+
* Attributes: { // Attributes
78+
* "<keys>": "STRING_VALUE",
79+
* },
80+
* ContactFlowId: "STRING_VALUE", // required
81+
* ChatDurationInMinutes: Number("int"),
82+
* ParticipantDetails: { // ParticipantDetails
83+
* DisplayName: "STRING_VALUE", // required
84+
* },
85+
* InitialSystemMessage: { // ChatMessage
86+
* ContentType: "STRING_VALUE", // required
87+
* Content: "STRING_VALUE", // required
88+
* },
89+
* RelatedContactId: "STRING_VALUE",
90+
* SupportedMessagingContentTypes: [ // SupportedMessagingContentTypes
91+
* "STRING_VALUE",
92+
* ],
93+
* ClientToken: "STRING_VALUE",
94+
* };
95+
* const command = new StartOutboundChatContactCommand(input);
96+
* const response = await client.send(command);
97+
* // { // StartOutboundChatContactResponse
98+
* // ContactId: "STRING_VALUE",
99+
* // };
100+
*
101+
* ```
102+
*
103+
* @param StartOutboundChatContactCommandInput - {@link StartOutboundChatContactCommandInput}
104+
* @returns {@link StartOutboundChatContactCommandOutput}
105+
* @see {@link StartOutboundChatContactCommandInput} for command's `input` shape.
106+
* @see {@link StartOutboundChatContactCommandOutput} for command's `response` shape.
107+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
108+
*
109+
* @throws {@link AccessDeniedException} (client fault)
110+
* <p>You do not have sufficient permissions to perform this action.</p>
111+
*
112+
* @throws {@link ConflictException} (client fault)
113+
* <p>Operation cannot be performed at this time as there is a conflict with another operation or
114+
* contact state.</p>
115+
*
116+
* @throws {@link InternalServiceException} (server fault)
117+
* <p>Request processing failed because of an error or failure with the service.</p>
118+
*
119+
* @throws {@link InvalidRequestException} (client fault)
120+
* <p>The request is not valid.</p>
121+
*
122+
* @throws {@link LimitExceededException} (client fault)
123+
* <p>The allowed limit for the resource has been exceeded.</p>
124+
*
125+
* @throws {@link ResourceNotFoundException} (client fault)
126+
* <p>The specified resource was not found.</p>
127+
*
128+
* @throws {@link ThrottlingException} (client fault)
129+
* <p>The throttling limit has been exceeded.</p>
130+
*
131+
* @throws {@link ConnectServiceException}
132+
* <p>Base exception class for all service exceptions from Connect service.</p>
133+
*
134+
* @public
135+
*/
136+
export class StartOutboundChatContactCommand extends $Command
137+
.classBuilder<
138+
StartOutboundChatContactCommandInput,
139+
StartOutboundChatContactCommandOutput,
140+
ConnectClientResolvedConfig,
141+
ServiceInputTypes,
142+
ServiceOutputTypes
143+
>()
144+
.ep(commonParams)
145+
.m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) {
146+
return [
147+
getSerdePlugin(config, this.serialize, this.deserialize),
148+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
149+
];
150+
})
151+
.s("AmazonConnectService", "StartOutboundChatContact", {})
152+
.n("ConnectClient", "StartOutboundChatContactCommand")
153+
.f(void 0, void 0)
154+
.ser(se_StartOutboundChatContactCommand)
155+
.de(de_StartOutboundChatContactCommand)
156+
.build() {
157+
/** @internal type navigation helper, not in runtime. */
158+
protected declare static __types: {
159+
api: {
160+
input: StartOutboundChatContactRequest;
161+
output: StartOutboundChatContactResponse;
162+
};
163+
sdk: {
164+
input: StartOutboundChatContactCommandInput;
165+
output: StartOutboundChatContactCommandOutput;
166+
};
167+
};
168+
}

clients/client-connect/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export * from "./StartChatContactCommand";
194194
export * from "./StartContactEvaluationCommand";
195195
export * from "./StartContactRecordingCommand";
196196
export * from "./StartContactStreamingCommand";
197+
export * from "./StartOutboundChatContactCommand";
197198
export * from "./StartOutboundVoiceContactCommand";
198199
export * from "./StartTaskContactCommand";
199200
export * from "./StartWebRTCContactCommand";

clients/client-connect/src/models/models_0.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,7 @@ export interface Campaign {
22992299
* @enum
23002300
*/
23012301
export const EndpointType = {
2302+
CONNECT_PHONENUMBER_ARN: "CONNECT_PHONENUMBER_ARN",
23022303
CONTACT_FLOW: "CONTACT_FLOW",
23032304
TELEPHONE_NUMBER: "TELEPHONE_NUMBER",
23042305
VOIP: "VOIP",
@@ -2955,7 +2956,7 @@ export type NumericQuestionPropertyAutomationLabel =
29552956
* <li>
29562957
* <p> Duration labels, such as <code>NON_TALK_TIME</code>, <code>CONTACT_DURATION</code>,
29572958
* <code>AGENT_INTERACTION_DURATION</code>, <code>CUSTOMER_HOLD_TIME</code> have a minimum value
2958-
* of 0 and maximum value of 28800.</p>
2959+
* of 0 and maximum value of 63072000.</p>
29592960
* </li>
29602961
* <li>
29612962
* <p>Percentages have a minimum value of 0 and maximum value of 100. </p>

0 commit comments

Comments
 (0)