Optimization Applied

This webhook is triggered when Bringg completes a round of route optimization. It includes the details of the routes and any orders Bringg was not able to assign to a route.

📘

Registering Your URL for the Note Was Added to Task Webhook

For information describing how to register your URL for a webhook and the different webhook options, see Bringg Webhooks.

{
   "unassigned_tasks": [
    {
      "id": null,
      "status": null,
      "title": null,
      "external_id": null,
      "way_points": [
        {
          "id": null,
          "position": null,
          "scheduled_at": null,
          "eta": null,
          "address": null
        }
      ]
    }
  ],
   "actual_breaks": [
    {
      "user_id": null,
      "id": null
    }
  ],
   "runs":[
      {
         "id":6752856,
         "user_id":17537,
         "estimated_distance_traveled":null,
         "team_id":1168,
         "scheduled_end_time":"2023-02-20T11:36:00.000Z",
         "external_id":"6752856",
         "tasks":[
            {
               "id":40945499,
               "status":1,
               "title":"A5500441293",
               "external_id":"A5500441293_20230220",
               "way_points":[
                  {
                     "id":53922400,
                     "position":2,
                     "scheduled_at":"2023-02-20T09:45:00.000Z",
                     "eta":"2023-02-20T09:45:00.000Z",
                     "address":"18 RUE Theophraste renaudot"
                  }
               ]
            },
            {
               "id":40945545,
               "status":1,
               "title":"A905DB52560",
               "external_id":"A905DB52560_20230220",
               "way_points":[
                  {
                     "id":53922447,
                     "position":2,
                     "scheduled_at":"2023-02-20T08:27:00.000Z",
                     "eta":"2023-02-20T08:27:00.000Z",
                     "address":"4 CITE THURE"
                  }
               ]
            },
            {
               "id":40945398,
               "status":6,
               "title":"A1142105441",
               "external_id":"A1142105441_20230220",
               "way_points":[
                  {
                     "id":53922294,
                     "position":2,
                     "scheduled_at":"2023-02-20T11:00:00.000Z",
                     "eta":"2023-02-20T11:00:00.000Z",
                     "address":"2 RUE EMILE FAGUET"
                  }
               ]
            },
            {
               "id":40945371,
               "status":1,
               "title":"A1001175173",
               "external_id":"A1001175173_20230220",
               "way_points":[
                  {
                     "id":53922266,
                     "position":2,
                     "scheduled_at":"2023-02-20T08:01:00.000Z",
                     "eta":"2023-02-20T08:01:00.000Z",
                     "address":"83 R FONDARY"
                  }
               ]
            },
            {
               "id":40945390,
               "status":1,
               "title":"A1001187939",
               "external_id":"A1001187939_20230220",
               "way_points":[
                  {
                     "id":53922285,
                     "position":2,
                     "scheduled_at":"2023-02-20T09:18:00.000Z",
                     "eta":"2023-02-20T09:18:00.000Z",
                     "address":"2 PAS DES ENTREPRENEURS"
                  }
               ]
            },
            {
               "id":40945372,
               "status":1,
               "title":"A1001179609",
               "external_id":"A1001179609_20230220",
               "way_points":[
                  {
                     "id":53922267,
                     "position":2,
                     "scheduled_at":"2023-02-20T08:57:00.000Z",
                     "eta":"2023-02-20T08:57:00.000Z",
                     "address":"28 R DES CEVENNES"
                  }
               ]
            },
            {
               "id":40945373,
               "status":1,
               "title":"A1001184771",
               "external_id":"A1001184771_20230220",
               "way_points":[
                  {
                     "id":53922268,
                     "position":2,
                     "scheduled_at":"2023-02-20T07:34:00.000Z",
                     "eta":"2023-02-20T07:34:00.000Z",
                     "address":"52 RUE DE LA CROIX NIVERT"
                  }
               ]
            },
            {
               "id":40945378,
               "status":1,
               "title":"A1001186870",
               "external_id":"A1001186870_20230220",
               "way_points":[
                  {
                     "id":53922273,
                     "position":2,
                     "scheduled_at":"2023-02-20T10:07:00.000Z",
                     "eta":"2023-02-20T10:07:00.000Z",
                     "address":"122 RUE BLOMET"
                  }
               ]
            },
            {
               "id":40945387,
               "status":1,
               "title":"A1001187580",
               "external_id":"A1001187580_20230220",
               "way_points":[
                  {
                     "id":53922282,
                     "position":2,
                     "scheduled_at":"2023-02-20T06:46:00.000Z",
                     "eta":"2023-02-20T06:46:00.000Z",
                     "address":"285 RUE DE VAUGIRARD"
                  }
               ]
            }
         ],
         "user":{
            "id":17537,
            "name":"602 MONO ALFORTVILLE",
            "status":"offline",
            "sub":"Assigned",
            "phone":"",
            "external_id":"602"
         }
      }
   ],
   "team_id":1168,
   "webhook_type":"optimization_applied",
   "merchant_id":19
}
{
  "unassigned_tasks": [
    {
      "id": 1234,
      "status": 0,
      "title": "Delivery Task",
      "external_id": "108-Ab4",
      "way_points": [
        {
          "id": 9876,
          "position": 1,
          "scheduled_at": null,
          "eta": null,
          "address": "123 Main St. New York, NY 10001",
        },
        {
          "id": 9877,
          "position": 2,
          "scheduled_at": "2023-01-01T12:47:00.000Z",
          "eta": "2023-01-01T12:47:00.000Z",
          "address": "123 1st Ave. New York, NY 10002"
        }
      ]
    }
  ],
  "runs": [
    {
      "id": 4567,
      "team_id": null,
			"scheduled_start_time": "2023-01-01T12:25:00.000Z",
      "scheduled_end_time": "2023-01-01T15:47:00.000Z",
      "external_id": "4567",
      "tasks": [
        {
          "id": 1236,
          "status": 6,
          "title": "Delivery Task",
          "external_id": "h9371",
          "way_points": [
            {
              "id": 9878,
         			"position": 1,
              "scheduled_at": null,
              "eta": null,
              "address": "123 Main St. New York, NY 10001",
            },
            {
              "id": 9879,
              "position": 2,
              "scheduled_at": "2023-01-01T12:47:00.000Z",
              "eta": "2023-01-01T12:47:00.000Z",
              "address": "123 1st Ave. New York, NY 10002"
            }
          ]
        }
      ],
      "user": {
        "id": 5740,
        "name": "Debbie Driver",
        "phone": "+15555555555,
        "external_id": "DBD-1937"
      }
    }
  ],
  "actual_breaks": [
    {
      "id": 1234,
      "user_id": 5740
    }
  ],
  "webhook_type": "optimization_applied",
  "merchant_id": 12362,
}

OUTPUT PARAMS

unassigned_tasks

array

Array of JSONS detailing any orders that Bringg could not add to a route.

runs

array

Array of JSONS detailing each order on the route.

actual_breaks

array

Details of the driver's breaks.