Communication Webhooks

Communication webhook URL can be configured in our portal under the Business > Webhooks > Communication section. The webhooks get activated whenever an SMS and/or Email is sent using the Customer Notification and/or Alerts.

{
    "status": "unknown",
    "medium": "sms",
    "sentAt": "2022-06-24T14:03:08.375Z",
    "eventType": "alert",
    "contents": "Order # 24June000110111 from Trackers Business for Mei Wan having Postmates tracking # del_DZOjlWPYTcWUkBOe_BpXzg has been updated to status Assigned.",
    "contentType": "text",
    "from": {
        "type": "alert",
        "phone": ""
    },
    "to": {
        "type": "alert",
        "phone": "+12015551023"
    },
    "provider": {
        "name": "twilio"
    },
    "order": {
        "event": "event.courier_update",
        "note": "Processed by Delivery Solutions",
        "status": "ORDER_UNDELIVERABLE",
        "receivedAt": "June 23rd 2022, 11:41:16 pm",
        "trackingNumber": "del_fGVo7rZjTfiTYWluoLXcpA",
        "provider": "Point Pickup",
        "orderId": "62b53cfbc85b10d7ffe3882f",
        "orderExternalId": "24June0001",
        "barcodes": [
            "12312351",
            "77091078"
        ],
        "groupId": "100405",
        "tenantId": "trackers_business",
        "statusUser": "Delivery Solutions",
        "orderAttributes": {},
        "storeExternalId": "Postmates_Store",
        "attachments": [],
        "driver": {
            "name": "Elena N. driver",
            "phone": "+17204667578",
            "photo": "",
            "driverExternalId": "",
            "driverId": "",
            "orgUnit": ""
        },
        "vehicle": {
            "type": "car/taxi",
            "color": "",
            "number": "",
            "vehicleExternalId": "",
            "vehicleId": ""
        },
        "lastLocation": {
            "updatedAt": "2022-06-24T04:41:09.330Z",
            "longitude": -118.44801605583696,
            "latitude": 34.21976775539418
        },
        "amount": 600,
        "trackingUrl": "https://s.dl-s.co/hcl3p6RRzW4",
        "providerTrackingUrl": "https://www.ubereats.com/orders/7c6568ee-b663-4df8-9361-696ea0b5dca4",
        "customerWebflowUrl": "",
        "estimatedPickupTime": 1656045035000,
        "estimatedPickupTimeByZone": "June 23rd 2022, 11:44 pm CDT",
        "estimatedDeliveryTime": 1656059435000,
        "estimatedDeliveryTimeByZone": "June 23rd 2022, 11:52 pm CDT",
        "pickupInstructions": "store pickupInstructions",
        "deliveryInstructions": null,
        "deliveryContact": {
            "name": "Mei Wan",
            "phone": "+1 201-555-1023",
            "customerId": "",
            "email": "",
            "notifySms": true,
            "notifyEmail": true
        },
        "deliveryAddress": {
            "street": "8849 North Sam Houston Parkway West",
            "street2": "",
            "apartmentNumber": "",
            "city": "Houston",
            "state": "TX",
            "zipcode": "77064",
            "country": "US",
            "latitude": 29.9259823,
            "longitude": -95.5523879
        },
        "pickUpAddress": {
            "street": "8849 North Sam Houston Parkway West",
            "street2": "",
            "secondary": "",
            "city": "Houston",
            "zipcode": "77064",
            "country": "US",
            "state": "TX",
            "latitude": 29.9259823,
            "longitude": -95.5523879
        },
        "hostedTrackingUrl": "https://s.dl-s.co/yMM_ftdtEsF",
        "errors": [],
        "estimatedPickupTimeStarts": null,
        "estimatedPickupTimeEnds": 1656045999000,
        "estimatedDeliveryTimeStarts": null,
        "estimatedDeliveryTimeEnds": 1656048222000,
        "labelLink": "https://sandbox.api.deliverysolutions.co/api/v2/label?orderId=62b53cfbc85b10d7ffe3882f&token=NjJiNTNjZmJjODViMTBkN2ZmZTM4ODJm",
        "timeZone": "America/Chicago",
        "receivedAtEpoch": 1656045676018,
        "currency": "cents",
        "currencyCode": "USD",
        "alternateLocation": null,
        "type": "delivery",
        "serviceType": "Delivery",
        "isTipsPosted": false,
        "tips": null,
        "fee": null,
        "proposedProviders": [],
        "feedback": null,
        "clonedFrom": "62b4adcdc85b10d7ffdd82be",
        "serviceId": "delivery",
        "pickupTime": {
            "startsAt": 1656044855530
        },
        "dropoffTime": {
            "endsAt": 1656044915530
        },
        "isSelfHealed": false,
        "providerBatch": {
            "batchId": "62b46cfbc12b18e7bae1986f"
        },
        "subStatus": "RETURN_AT_LOCATION",
        "eventReason": {
            "code": "DRIVER_REFUSED",
            "title": "Driver refused to pickup the order",
            "note": "CD-011 - Driver: Refused Order",
            "status": "ORDER_UNDELIVERABLE",
            "subStatus": "RETURN_AT_LOCATION",
            "updatedAtEpoch": 1666817167059
        },
        "exceptionDetails": {
            "lastTriggered": "preDispatch",
            "preDispatch": {
                "exceptionType": "phone-number-failure"
            }
        },
        "undeliverableOrderReturnLocation": {
            "address": {
                "street": "502 Park Avenue",
                "street2": "",
                "secondary": "",
                "city": "New York",
                "zipcode": "10022",
                "country": "US",
                "state": "NY",
                "latitude": 40.76321409999999,
                "longitude": -73.9698963
            },
            "contact": {
                "name": "John Smith",
                "phone": "+1 201-555-0123"
            },
            "name": "WareHouse 301",
            "pickupInstructions": "Valid driver’s license or government issued photo ID is required"
        },
        "returnStoreId": "301"
    }
}