Fork me on GitHub

Template perishable-goods@0.1.1

This clause specifies penalties if the transport conditions (temperature and humidity) for a package are breached.

Download Archive

Perishable Goods

This clause specifies penalties if the transport conditions (temperature and humidity) for a package are breached.

Sample

On receipt of the shipment "SHIP_001" the importer "DAN" pays the grower "PETER" 1.50 USD per KG. The shipment must contain between 3000 and 3500 KG of "Grade I, Size 4, Zutano Mexican Avocados".

Shipping containers used must be temperature and humidity controlled, and sensor readings must be logged at least 1 per hours.

Shipments that arrive after 07/02/2018 are to be considered spoiled and must be arranged to be returned to or disposed of by grower at cost to grower.

Temperature readings for the shipment must be between 2 and 13.

Humidity readings for the shipment must be between 70 and 90.

Shipments that have a temperature or humidity reading outside the agreed range have a price penalty applied calculated using the Formula for Breach Penalty Calculation below. The breach penalty factor to be used is 0.2.

Formula for Breach Penalty Calculation:
   penalty = number of shipment units x difference between sensor reading and agreed range x breach penalty factor

                

Model Dependencies

Technical Integration

Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.

View the Latest code for this template on on GitHub.

Sample Instance

{
    "$class": "org.accordproject.perishablegoods.PerishableGoodsClause",
    "grower": "resource:org.accordproject.perishablegoods.Grower#5414",
    "importer": "resource:org.accordproject.perishablegoods.Importer#8061",
    "shipment": "resource:org.accordproject.perishablegoods.Shipment#5224",
    "dueDate": "2018-06-12T04:49:59.701Z",
    "unitPrice": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 239.187,
        "currencyCode": "CHF"
    },
    "unit": "TONNE",
    "minUnits": 2623,
    "maxUnits": 28736,
    "product": "Ipsum.",
    "sensorReadingFrequency": 59873,
    "duration": "days",
    "minTemperature": 55.268,
    "maxTemperature": 91.389,
    "minHumidity": 191.86,
    "maxHumidity": 52.108,
    "penaltyFactor": 74.592,
    "clauseId": "0fad4540-6dfc-11e8-a721-c707466e2b12"
}

State

{
    "state": "tbd"
}

Request Types

Type Sample JSON
org.accordproject.perishablegoods.ShipmentReceived
{
    "$class": "org.accordproject.perishablegoods.ShipmentReceived",
    "unitCount": 5596,
    "shipment": "resource:org.accordproject.perishablegoods.Shipment#3040",
    "transactionId": "0faef2f0-6dfc-11e8-a721-c707466e2b12",
    "timestamp": "2018-06-12T04:49:59.711Z"
}

Response Types

Type Sample JSON
org.accordproject.perishablegoods.PriceCalculation
{
    "$class": "org.accordproject.perishablegoods.PriceCalculation",
    "totalPrice": 115.23,
    "penalty": 24.523,
    "late": false,
    "shipment": "resource:org.accordproject.perishablegoods.Shipment#3200",
    "transactionId": "0faf1a00-6dfc-11e8-a721-c707466e2b12",
    "timestamp": "2018-06-12T04:49:59.712Z"
}

Events Types

Type Sample JSON