in website-creator/js/connectflows.js [732:764]
async function createContactFlow(){
handleWindow(true, '');
var dlgSelectInstance = $('#dlgSelectInstance').val();
var dlgContactFlowName = $('#dlgContactFlowName').val();
var dlgContactFlowType = $('#dlgContactFlowType').val();
var dlgContactFlowDescription = $('#dlgContactFlowDescription').val();
var contactFlowJSON = $('#contactFlowJSON').val();
if(dlgSelectInstance == 1){
saveFlow(dlgSourceAccessKey, dlgSourceSecretKey, dlgSourceRegion, dlgSourceInstance,dlgContactFlowName,dlgContactFlowType,dlgContactFlowDescription,contactFlowJSON ).then(
(resp) => {
console.log(resp);
getContactFlows();
handleWindow(false, '');
},
(error) => {
console.log(error);
handleWindow(false, '');
showResults(error);
});
}else{
try{
let resp = await saveFlow(dlgTargetAccessKey, dlgTargetSecretKey, dlgTargetRegion, dlgTargetInstance,dlgContactFlowName,dlgContactFlowType,dlgContactFlowDescription,contactFlowJSON);
console.log(resp);
getContactFlows2();
handleWindow(false, '');
}catch(e){
handleWindow(false, '');
showResults(e);
}
}
}