https://blogs.perficient.com/2018/11/19/ac-outbound-api/ has a good example, that I've followed successfully.
The call is:
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) { ... });
Given a contact flow (of type "Contact Flow"), with arn: arn:aws:connect:us-east-1:xxxxxxxx:instance/12345l-abcd-1234-abcde-123456789bcde/contact-flow/987654-lkjhgf-9875-abcde-poiuyt0987645
The SourcePhoneNumber is required and must be one of those in your Amazon Connect. Or use a queue number if you have any defined.
The Attributes
property will be passed as-is and will be available in text-to-speech, in your Contact Flow, with a form similar to $.Attributes.dayOfWeek.
The Contact Flow can be as simple as one Start, connected to one 'Play Prompt', connected to 'Disconnect/Hang up'.
All props go to https://blogs.perficient.com/author/dhodanic/