1

I achieved the following use case :

1) I am able to programmatically make an outbound call for the 'Contact flow (inbound)' contact flow type using the following code

 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');
        }
    }
    ); 

It is successfully working. But one issue is 'It will directly call the customer from the AWS Connect which will not include the agent'

2) Using the Amazon CCP (Call Control Panel), I am able to make an outbound call to the customer and It is working successfully.

TODO / AIM :

Instead of 'contact inbound flow type', If I try to use the 'Agent Transfer flow type' with the same code,

enter image description here

It is failed with the following error

  message: 'ContactFlow type is invalid',
  code: 'InvalidParameterException',
  time: 2019-10-17T14:28:02.568Z,
  requestId: 'e7359538-a0b2-47c5-a61f-6c7e1b4bf7a6',
  statusCode: 400,
  retryable: false,
  retryDelay: 63.66530948519367 }

So how do I automatically connect the agent to the customer in the call?

Harry
  • 3,072
  • 6
  • 43
  • 100

1 Answers1

0

startOutboindVoiceContact() must be provided the ID of a contact flow that is of type Inbound. So you simply need to change your inbound contact flow to perform the following steps:

  1. Set the queue that has the agent, using the “set working queue” block
  2. Send the call to the queue, using the “transfer to queue” block

This will delivers the call to an available agent in the queue or queue the call if there no available agent at the time of transfer.

Aossey
  • 850
  • 4
  • 13