Purchase Order Failure

Author: Accord Project

purchase-order-failure@0.12.0 Contract ^0.26.0 9aedc24c7e2e7e05d07759c2eef35388d48333c6dce09b2f1e0df80757b5e717

Issues credits for late purchase orders. Purchase orders sent via DocuSign must have the text recipient tabs with the following tab labels and validations: deliveryDate with Date validation, actualPrice with Numbers validation and currencyCode with no validation.

Download Archive Download Compiled Archive Open in Template Playground Open in VSCode Web

Purchase Order Failure

This clause emits a payment obligation for purchase orders that are received late. Purchase orders sent via DocuSign must have the "text" recipient tabs with the following tab labels and validations: deliveryDate with "Date" validation, actualPrice with "Numbers" validation and currencyCode with no validation.

Template Text

In the event that a Purchase Order Failure causes any Product to be delivered more than 1 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 5.0% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 2 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 10% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 10 days, after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 50% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". Any discount amount owing to "Buyer Corp" pursuant to this "Section 3.5(c)" shall be paid by paying "Buyer Corp" such amount via electronic money transfer. In case of 5 or more Purchase Order Failures in the past 60 days, then "Buyer Corp" shall be entitled to an additional 599.99 USD compensation.

In the event that a Purchase Order Failure causes any Product to be delivered more than 1 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 5.0% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 2 days after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 10% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". In the event that a Purchase Order Failure causes any Product to be delivered more than 10 days, after the delivery date for such Product specified in the applicable Purchase Order therefore, "Buyer Corp" shall be entitled to receive a 50% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to "Article 5". Any discount amount owing to "Buyer Corp" pursuant to this "Section 3.5(c)" shall be paid by paying "Buyer Corp" such amount via electronic money transfer. In case of 5 or more Purchase Order Failures in the past 60 days, then "Buyer Corp" shall be entitled to an additional 599.99 USD compensation.
In the event that a Purchase Order Failure causes any Product to be delivered more than {{lateOne}} after the delivery date for such Product specified in the applicable Purchase Order therefore, {{buyerName}} shall be entitled to receive a {{lateOnePercent}}% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to {{article}}. In the event that a Purchase Order Failure causes any Product to be delivered more than {{lateTwo}} after the delivery date for such Product specified in the applicable Purchase Order therefore, {{buyerName}} shall be entitled to receive a {{lateTwoPercent}}% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to {{article}}. In the event that a Purchase Order Failure causes any Product to be delivered more than {{lateThree}}, after the delivery date for such Product specified in the applicable Purchase Order therefore, {{buyerName}} shall be entitled to receive a {{lateThreePercent}}% discount on the Actual Price for such late delivered Product which would otherwise have been payable pursuant to {{article}}. Any discount amount owing to {{buyerName}} pursuant to this {{thisSection}} shall be paid by paying {{buyerName}} such amount via electronic money transfer. In case of {{maxFailures}} or more Purchase Order Failures in the past {{failureRange}}, then {{buyerName}} shall be entitled to an additional {{repeatedFailureCompensationAmount}} {{repeatedFailureCompensationCurrency}} compensation.
{
    "$class": "org.accordproject.docusignpofailure@0.1.0.TemplateModel",
    "buyerName": "Ipsum ullamco consequat dolor.",
    "lateOne": {
        "$class": "org.accordproject.time@0.3.0.Duration",
        "amount": 1391985776,
        "unit": "weeks"
    },
    "lateTwo": {
        "$class": "org.accordproject.time@0.3.0.Duration",
        "amount": 1990385079,
        "unit": "hours"
    },
    "lateThree": {
        "$class": "org.accordproject.time@0.3.0.Duration",
        "amount": 4287661571,
        "unit": "days"
    },
    "lateOnePercent": 13.97,
    "lateTwoPercent": 103.014,
    "lateThreePercent": 60.571,
    "article": "Incididunt Lorem aliquip magna.",
    "thisSection": "Minim aute ex dolor sunt.",
    "maxFailures": 7093,
    "failureRange": {
        "$class": "org.accordproject.time@0.3.0.Duration",
        "amount": 2464486495,
        "unit": "weeks"
    },
    "repeatedFailureCompensationAmount": 157.015,
    "repeatedFailureCompensationCurrency": "Pariatur culpa aliquip.",
    "clauseId": "78aedb60-50a4-11f1-a498-6b6dff021a96",
    "$identifier": "78aedb60-50a4-11f1-a498-6b6dff021a96"
}

Template Model

namespace org.accordproject.docusignpofailure@0.1.0

import org.accordproject.contract@0.2.0.Clause from https://models.accordproject.org/accordproject/contract@0.2.0.cto
import org.accordproject.runtime@0.2.0.{Request,Response} from https://models.accordproject.org/accordproject/runtime@0.2.0.cto
import org.accordproject.time@0.3.0.Duration from https://models.accordproject.org/time@0.3.0.cto
import com.docusign.connect@0.4.0.DocuSignEnvelopeInformation from https://models.accordproject.org/docusign/connect@0.4.0.cto

transaction PurchaseOrderFailureResponse extends Response {
  o Double penaltyAmount
  o String currencyCode
}

event PurchaseOrderPaymentEvent {
  o Double penaltyAmount
  o String currencyCode
  o String description
}

concept PurchaseOrderFailureState identified {
  o DateTime[] pastFailures
  o Integer nbPastFailures default=0
}

@template
asset TemplateModel extends Clause {
  o String buyerName

  o Duration lateOne
  o Duration lateTwo
  o Duration lateThree

  o Double lateOnePercent
  o Double lateTwoPercent
  o Double lateThreePercent

  o String article
  o String thisSection

  o Integer maxFailures
  o Duration failureRange
  o Double repeatedFailureCompensationAmount
  o String repeatedFailureCompensationCurrency
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.runtime@0.2.0.State
{
    "$class": "org.accordproject.runtime@0.2.0.State",
    "$identifier": "78af2980-50a4-11f1-a498-6b6dff021a96"
}

Request Types

Type Sample JSON
com.docusign.connect@0.4.0.DocuSignEnvelopeInformation
{
    "$class": "com.docusign.connect@0.4.0.DocuSignEnvelopeInformation",
    "envelopeStatus": {
        "$class": "com.docusign.connect@0.4.0.EnvelopeStatus",
        "status": "Processing",
        "envelopeId": "Cupidatat.",
        "created": "2026-05-15T21:24:35.479Z",
        "sent": "2026-05-15T21:24:35.479Z",
        "delivered": "2026-05-15T21:24:35.479Z",
        "signed": "2026-05-15T21:24:35.479Z",
        "completed": "2026-05-15T21:24:35.479Z",
        "declined": "2026-05-15T21:24:35.479Z",
        "email": "Consectetur Lorem et ullamco qui."
    },
    "recipients": [
        {
            "$class": "com.docusign.connect@0.4.0.Recipient",
            "status": "Created",
            "email": "Excepteur reprehenderit et Lorem.",
            "userName": "Ut officia.",
            "sent": "2026-05-15T21:24:35.479Z",
            "delivered": "2026-05-15T21:24:35.479Z",
            "signed": "2026-05-15T21:24:35.479Z",
            "declined": "2026-05-15T21:24:35.479Z",
            "declineReason": "Id esse aute duis.",
            "tabStatuses": [
                {
                    "$class": "com.docusign.connect@0.4.0.NumberTabStatus",
                    "tabName": "Qui sit.",
                    "tabValue": 80.869,
                    "tabType": "Approve",
                    "status": "Non.",
                    "tabLabel": "Voluptate mollit dolore do.",
                    "originalValue": "Amet enim in ad enim.",
                    "signed": "2026-05-15T21:24:35.479Z",
                    "customTabType": "List"
                }
            ]
        }
    ],
    "customFields": [
        {
            "$class": "com.docusign.connect@0.4.0.CustomField",
            "name": "Ex amet mollit ea.",
            "value": "Amet officia."
        }
    ],
    "attachments": [
        {
            "$class": "com.docusign.connect@0.4.0.Attachment",
            "docType": "CertificateOfCompletion",
            "identifier": "3125",
            "name": "Lorem fugiat.",
            "mimeType": "Eiusmod sit eu.",
            "encoding": "base64",
            "$identifier": "3125"
        }
    ],
    "$timestamp": "2026-05-15T21:24:35.479Z"
}
org.accordproject.runtime@0.2.0.Request
{
    "$class": "org.accordproject.runtime@0.2.0.Request",
    "$timestamp": "2026-05-15T21:24:35.479Z"
}

Response Types

Type Sample JSON
org.accordproject.docusignpofailure@0.1.0.PurchaseOrderFailureResponse
{
    "$class": "org.accordproject.docusignpofailure@0.1.0.PurchaseOrderFailureResponse",
    "penaltyAmount": 46.968,
    "currencyCode": "Sunt reprehenderit quis.",
    "$timestamp": "2026-05-15T21:24:35.480Z"
}
org.accordproject.runtime@0.2.0.Response
{
    "$class": "org.accordproject.runtime@0.2.0.Response",
    "$timestamp": "2026-05-15T21:24:35.480Z"
}

Events Types

Type Sample JSON

Technical Integration

Please refer to the Accord Project documentation for how to use a template or integrate it within your application.

View the Latest code for this template on GitHub.