Updating existing and adding new leads to an outbound dialer list

When working with outbound dialer campaigns and lists, we can make use of the functionality to add new leads or to update existing leads during live operations. This article explains how to achieve this:

  1. Upload a new lead

  2. Update an existing lead

Let's look at the POST request to upload a new leads first

In this case we make use of the following API request:
POST https://{{env}}.babelforce.com/api/v2/outbound/lists/:listId/leads/

{
"uid": "uuid_100",
    "number": "4916098119998",
    "rank": 500,
    "data": {
        "address": "martin mendalde",
        "new data": "new"
    }
}
With this request, we can
  • upload `uid`, `number` and `rank` info - these fields are mandatory
  • add data to the data object (e.g. "new data")

 

Now, let's look at how to update existing leads via PUT:

Before we can update an existing lead, we need to retrieve their Id. Therefore, we use the endpoint:
GET https://{{env}}.babelforce.com/api/v2/outbound/lists/:listId/leads

From the API response, we can retrieve the lead Id (parameter: "id"): 

{
    "item": {
        "id": "ee369f62c0c04c8993e4b3921c506c45",
        "campaignId": "3d468d1a3f184c51abad810f65bfca4b",
        "listId": "cfd395e2301b45f78a0f6abddbe15a4e",
        "uid": "2",
        "number": "12692333",
...
}
}

Then we update the lead via the following endpoint: 

PUT https://{{env}}.babelforce.com/api/v2/outbound/lists/:listId/leads/:leadId

{
    "rank": 200,
    "data": {
        "address": "martin mendalde",
        "new data": "new"
        "old data": null
    }
}
With this request, we can
  • update `uid`, `number` and `rank` info
  • add data to the data object (e.g. "new data")
  • delete existing variables from the data object (e.g. "old data") 

 

Please note: 

The babelforce outbound dialer works with a so called "hopper". The system loads those leads into the hopper which the outbound dialer will try to call next. The default minimum hopper size is 20 but can be adjusted according to your needs. 

What does this mean for the lead update?

Leads that are already loaded into the hopper cannot be updated anymore or rather, the update is not taken into consideration anymore. 

For example: 
Consider a lead list with 50 leads (ranked 50-1) and a minimum hopper size of 20. After the list upload, the 20 leads with the highest rank are loaded into the hopper. 

  • An update of lead with rank 40 will now not be considered anymore, because the lead has been loaded into the hopper already. 
  • An change of the lead with rank 10 to rank 100 will not be considered for the current hopper batch anymore. However, it will end up at the top of the next hopper batch. This means that there can be slight delays before leads will be called although they might be the ones with the highest rank in the list. 

Please reach out to support@babelforce.com in case you want to tweak the hopper size. We will adjust it for you. 

 

 

 

Have more questions? Submit a request