Recipient Overrides

Recipient Overrides

Phone numbers are considered unique identifiers for each recipient. If there are two recipients with the same phone number, the later records – including address, name, and notes – will overwrite the previous records.

If there’s a case where the contact is different from the recipient, such as a gift, the Recipient override feature allows for there to be another name and phone number attached to the task for dispatch purposes. To change the contact name, notes, and/or SMS settings for a single task, without changing the recipient values themselves, the optional recipient override parameters can be used instead: recipientName, recipientNotes, and recipientSkipSMSNotifications.

Examples:

curl -X POST "https://onfleet.com/api/v2/tasks" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"destination":{"address":{"unparsed":"2829 Vallejo St, SF, CA, USA"}, "notes":"destinaion notes"},"recipients":[{"name":"Recipient Name","phone":"650-555-4481","notes":"A name added here will update the recipient entry associated with this phone number."}],"recipientName":"Override Name","notes":"Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."}'
onfleet.tasks.create(body={"destination":{"address":{"unparsed":"2829 Vallejo St, SF, CA, USA"}, "notes":"destinaion notes"},"recipients":[{"name":"Recipient Name","phone":"650-555-4481","notes":"A name added here will update the recipient entry associated with this phone number."}],"recipientName":"Override Name","notes":"Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."})
onfleet.tasks.create({"destination":{"address":{"unparsed":"2829 Vallejo St, SF, CA, USA"}, "notes":"destinaion notes"},"recipients":[{"name":"Recipient Name","phone":"650-555-4481","notes":"A name added here will update the recipient entry associated with this phone number."}],"recipientName":"Override Name","notes":"Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."});
$onfleet->tasks->create(["destination" => ["address" => ["unparsed" => "2829 Vallejo St, SF, CA, USA"], "notes" => "destinaion notes"],"recipients" => [["name" => "Recipient Name","phone" => "650-555-4481","notes" => "A name added here will update the recipient entry associated with this phone number."]],"recipientName" => "Override Name","notes" => "Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database."]);
{
    "id": "5cywkiSnntKw0KqdTcqURvL3",
    // ...
    "notes": "Override Name will be displayed on the dashboard and in the app, but not update the recipient in the database.",
    // ...
    "overrides": { // note that this differs from the JSON in the request
        "recipientName": "Override Name",
        "recipientNotes": null,
        "recipientSkipSMSNotifications": null,
        "useMerchantForProxy": null
    },
    // ...
    "recipients": [
        {
            "id": "v7lVeNMHWsDwt*WuzcLmTAbg",
            "timeCreated": 1611068037000,
            "timeLastModified": 1615839055669,
            "name": "Recipient Name",
            "phone": "+16505554481",
            "notes": "A name added here will update the recipient entry associated with this phone number.",
            "organization": "id6a7XAWagLC7iMR0NvW1DFM",
            "skipSMSNotifications": false,
            "metadata": []
        }
    ],
    // ...
}

The above example will let you keep the same phone number +16505554481 , but will display Override Name on the Onfleet Dashboard without changing any of the previous records that are associated with the phone number.

📘

Gift Use Case

Recipient Override is useful if the Contact that ordered a gift wants to conceal a notification from the intended recipient. In the above example, the Override Name will come up on the dispatch display, and is the gift receiver, where as the Onfleet notification will send a SMS to the ordering Contact with the phone number, denoted by Recipient Name.