Progressive and Predictive Calls
    • Dark
      Light

    Progressive and Predictive Calls

    • Dark
      Light

    Article summary

    Progressive or Predictive Reservations are auto accepted as soon as the reservation reaches the Agent. There are two ways to auto accept:

    • Using a Plug-in

    • Using Functions

    Campaign Manager recommends using Functions model to auto accept the call.

    Auto Accept Using Plug-In

    function AutoAcceptForNonPreview(reservation) {
            console.log("Auto Accept the Non Preview Task");
            flex.Actions.invokeAction("AcceptTask", {
              sid: reservation.sid,
            });
          }

    Auto Accept Using Functions

    For Non-Tethered, the function is used to auto accept the calls for Progressive and Predictive Dialing. Campaign Manager recommends to deploy the functions as services using the Twilio Flex Serverless CLI.

    Perform the following steps:

    1. Install Visual Studio Code or Cygwin Terminal to run the Twilio Flex commands.

    2. Download AcqueonFunctions from the shared folder.

    3. Open Cygwin Terminal in the Administrator Mode.

    4. Point to the directory where the Functions Folder is located. For example, if the functions folder is located at D:\ AcqueonFunctions, then change the directory using the following command:

      PS D:\Twilio-Plugins> cd .\AcqueonFunctions\
    5. Go to the AcqueonFunctions folder.

    6. Set the Twilio Account SID and Twilio Auth Token using the following commands:

      export TWILIO_ACCOUNT_SID=YourTwilioAccountSID
      export TWILIO_AUTH_TOKEN=YourTwilioAuthToken
    7. Open the .env file in the Functions folder and change the required values. This is the mandatory step to follow. Use the following command:

      ACCOUNT_SID=Your Twilio Account SID
      AUTH_TOKEN=Your Twilio Auth Token
    8. Install the node modules using the following command:

      npm install
    9. Deploy the functions using the following command:

      twilio serverless:deploy
    10. If deploying to an existing function, use the following command:

      twilio serverless:deploy --override-existing-project

      After completing the deployment, the function URL is created.

    11. Go to Twilio Console > Functions and Assets > Services to verify the deployed service.

    12. Click AcqueonFunctions to view more information and function logs.

    13. Copy the Function URL.

    14. Go to TaskRouter > Workspaces > Workflows.

    15. Select the Workflow.

    16. Go to the Assignment Callback section.

    17. Configure the Function URL as given below. The deployment of functions as services is completed successfully.


    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence