0

我有一个简单的联系流程,如下所示,我从中触发了从 Amazon Connect(AWS Connect 中声称的电话号码)到最终客户(真实客户电话号码)的呼叫:

在此处输入图像描述

现在我想在 Amazon Connect 端连接一个代理。

当我触发以下代码时,我需要触发从 Amazon Connect(客户代理)到最终客户(真实客户电话号码)的呼叫

const AWS = require('aws-sdk');
AWS.config.update({ region: 'us-east-1' });

exports.handler = (event, context, callback) => {
    let connect = new AWS.Connect();

    const customerName = event.name;
    const customerPhoneNumber = event.number;
    const dayOfWeek = event.day;

    let params = {
        "InstanceId" : '12345l-abcd-1234-abcde-123456789bcde',
        "ContactFlowId" : '987654-lkjhgf-9875-abcde-poiuyt0987645',
        "SourcePhoneNumber" : '+1123456789',
        "DestinationPhoneNumber" : customerPhoneNumber,
        "Attributes" : {
            'name' : customerName,
            'dayOfWeek' : dayOfWeek
        }

    }

    connect.startOutboundVoiceContact(
        params, function (error, response){

            if(error) {
                console.log(error)
                callback("Error", null);
            } else
            {
                console.log('Initiated an outbound call with Contact Id ' + JSON.stringify(response.ContactId));
                callback(null, 'Success');
            }
        }
    );
};
  1. 如何在联系流中添加客户代理?
  2. 日志记录不起作用(无法在 CloudWatch AWS 中找到任何日志)
  3. 我的通话录音是否添加到联系流的右侧部分?
4

1 回答 1

0

To connect the call to an agent, you need to add a “set working queue” block to set the call to route to a queue where you have available agents. After you set your queue, replace the “disconnect / hang up” block with a “transfer to queue” block. This will route the call to an available agent or queue the call if no agent is immediately available.

Recording will only occur for the portion of the call between the agent and the outside party, so you won’t see any recordings for calls that didn’t get connected to an agent. Since you have the “set recording behavior” block set to “customer and agent” in your flow already, you should get a recording file when the call gets connected to an agent with the steps above.

于 2019-10-24T04:55:25.887 回答