[OPTIONAL] Filtering a Custom Notification

Adding a Filters to a Custom Notification

Custom Notifications can be filtered in order to refine the shipments that the user wants to be notified about. To add a filter to a Custom Notification, simply add the parameters below:

Parameter

Type

Description

propertyName

String

Name of the filter.

propertyValue

String

Accepted values as seen: Notification Filter Accepted Values

Completed Custom Notification with Filters

Here is an example of a valid Custom Notification JSON Object with filters applied:

{
            "notificationName": "Stop Notification with Filters",
            "notificationRecipientType": "stoplevel",
            "notificationTypeLabel": "shipmentStatusChange",
            "notificationTypes": [
                "ShipmentStatusEnRoute",
                "ShipmentStatusAtShipper",
                "ShipmentStatusInTransit"
            ],
            "filters": [
                {
                    "propertyName": "ModeType",
                    "propertyValue": "Truckload"
                },
                  {
                    "propertyName": "HotShipments",
                    "propertyValue": "Yes"
                }
            ],
            "notifyStopContactsByEmail": true,
            "notifyStopContactsBySms": false
        }
{
            "notificationName": "Shipment Notification with Filters",
            "notificationRecipientType": "shipmentLevel",
            "notificationTypeLabel": "shipmentStatusChange",
            "notificationTypes": [
                "ShipmentStatusEnRoute",
                "ShipmentStatusAtShipper",
                "ShipmentStatusInTransit",
                "ShipmentStatusAtConsignee",
				        "ShipmentStatusDelivered"
            ],
             "filters": [
                {
                    "propertyName": "ModeType",
                    "propertyValue": "Truckload"
                },
                  {
                    "propertyName": "HotShipments",
                    "propertyValue": "Yes"
                }
                ],
            "emailList": [
            "[email protected]"
            ],
            "smsList": [5555551212]
        }

Success Response:

{
    "data": [
        {
            "notificationGuid": "b06959f4-f9e3-41c2-b01e-4a6850e3f40a",
            "notificationName": "Shipment Notification with Filters",
            "notificationRecipientType": "shipmentLevel",
            "notificationTypeLabel": "shipmentStatusChange",
            "notifyStopContactsByEmail": false,
            "notifyStopContactsBySms": false,
            "notificationMetaData": null,
            "notificationTypes": [
                "ShipmentStatusEnRoute",
                "ShipmentStatusAtShipper",
                "ShipmentStatusInTransit",
                "ShipmentStatusAtConsignee",
                "ShipmentStatusDelivered"
            ],
            "filters": [
                {
                    "propertyName": "ModeType",
                    "propertyValue": "TruckLoad"
                },
                {
                    "propertyName": "HotShipments",
                    "propertyValue": "Yes"
                }
            ],
            "lastUpdateUserName": "[email protected]",
            "lastUpdateDate": "2018-08-16T06:21:31.999141+00:00",
            "emailList": [
                "[email protected]"
            ],
            "smsList": [
                "5555551212"
            ]
        }
    ],
    "messages": [],
    "totalPossibleCount": 1
}
{
    "data": [
        {
            "notificationGuid": "fdd14e69-0dc5-4f66-b328-aa6cfea0c12c",
            "notificationName": "Stop Notification with Filters",
            "notificationRecipientType": "stopLevel",
            "notificationTypeLabel": "shipmentStatusChange",
            "notifyStopContactsByEmail": true,
            "notifyStopContactsBySms": false,
            "notificationMetaData": null,
            "notificationTypes": [
                "ShipmentStatusEnRoute",
                "ShipmentStatusAtShipper",
                "ShipmentStatusInTransit"
            ],
            "filters": [
                {
                    "propertyName": "ModeType",
                    "propertyValue": "TruckLoad"
                },
                {
                    "propertyName": "HotShipments",
                    "propertyValue": "Yes"
                }
            ],
            "lastUpdateUserName": "[email protected]",
            "lastUpdateDate": "2018-08-16T06:18:03.6928214+00:00",
            "emailList": [],
            "smsList": []
        }
    ],
    "messages": [],
    "totalPossibleCount": 1
}