AWS Connect - ContactFlow 类型无效

AWS Connect - ContactFlow type is invalid

我正在尝试使用 AWS Node.js SDK 调用联系流,但是当我调用 startOutboundVoiceContact 函数时,我总是收到以下错误:

Error: ContactFlow type is invalid

按照我要执行的代码进行操作:

var connect = new AWS.Connect(credentials);

const uuidv1 = require('uuid/v1');

var params = {
    ContactFlowId: '............8af7-06898b1cd530', /* required */
    DestinationPhoneNumber: '+55319.....375', /* required */
    InstanceId: '........4c6c-aef3-5e4d8744580c', /* required */
    Attributes: {},
    ClientToken: uuidv1(),
    QueueId: '',
    SourcePhoneNumber: '+1800.....69'
};
connect.startOutboundVoiceContact(params, function (err, data) {
    if (err) 
        console.log(err, err.stack); // an error occurred
    else 
        console.log(data);           // successful response
});

code:"InvalidParameterException" message:"ContactFlow type is invalid" name:"InvalidParameterException" requestId:"65ce71bf-5bb4-11e9-bba3-fd537199b3ea" retryable:false retryDelay:14.721126612979884 stack:"InvalidParameterException: ContactFlow type is invalid\n at Object.extractError (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\protocol\json.js:51:27)\n at Request.extractError (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\protocol\rest_json.js:52:8)\n at Request.callListeners (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\sequential_executor.js:106:20)\n at Request.emit (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\sequential_executor.js:78:10)\n at Request.emit (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\request.js:683:14)\n at Request.transition (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\request.js:22:10)\n at AcceptorStateMachine.runTo (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\state_machine.js:14:12)\n at C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\state_machine.js:26:10\n at Request. (C:\Users\vs35\AppData\Roaming\npm\node_modules\aws-sdk\lib\request.js:38:... statusCode:400

感谢大家的帮助!

您很可能会收到此错误,因为在您的 API 呼叫中 GUID 引用的联系流不是可用于启动出站联系的联系流类型。

例如:如果在 API 调用中提供的 GUID 引用“出站耳语”类型的联系流,则 API 调用将以这种方式进行。

检查这一点的一种简单方法是确保您引用的是可以在 Connect GUI 中分配给入站号码的联系流的 GUID。如果您可以分配一个入站号码来触发联系流,那么您应该可以在出站 API 呼叫中使用它。

可以找到联系流类型的解释 here