https://blogs.perficient.com/2018/11/19/ac-outbound-api/ 有一个很好的例子,我已经成功地遵循了。
电话是:
let params = {
"InstanceId" : '12345l-abcd-1234-abcde-123456789bcde',
"ContactFlowId" : '987654-lkjhgf-9875-abcde-poiuyt0987645',
"SourcePhoneNumber" : '+1xxxxxxxxx',
"DestinationPhoneNumber" : customerPhoneNumber,
"Attributes" : {
'name' : customerName,
'dayOfWeek' : dayOfWeek
}
}
let connect = new AWS.Connect();
connect.startOutboundVoiceContact(params, function (error, response) { ... });
给定一个联系流(“联系流”类型),arn:arn:aws:connect:us-east-1:xxxxxxxx:instance/12345l-abcd-1234-abcde-123456789bcde/contact-flow/987654 -lkjhgf-9875-abcde-poiuyt0987645
SourcePhoneNumber 是必需的,并且必须是您的 Amazon Connect 中的号码之一。或者,如果您有任何定义,请使用队列号。
Attributes 属性将按原样传递,并将在您的联系流中以文本转语音的形式提供,其形式类似于 $.Attributes.dayOfWeek。
联系流可以简单到一个开始,连接到一个“播放提示”,连接到“断开/挂断”。
所有道具都去https://blogs.perficient.com/author/dhodanic/