Docusign Connect

Author: Accord Project

docusign-connect@1.0.1 Contract ^2.0.0 bdea08c0b356ecdc43df6544c4b354c10b9d1ccaf2cefe22287511dcf26713c1

Counts events from DocuSign connect with a given envelope status.

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

DocuSign Connect

A template that counts events from DocuSign connect with a given envelope status.

Template Text

Count DocuSign connect events with the status: Completed.

Count DocuSign connect events with the status: Completed.
Count DocuSign connect events with the status: {{status}}.
{
  "$class": "org.accordproject.docusignconnect@0.1.0.TemplateModel",
  "status": "Completed",
  "$identifier": "94da90f6-5166-4ba7-8675-e2777407d464",
  "contractId": "94da90f6-5166-4ba7-8675-e2777407d464"
}

Template Model

namespace org.accordproject.docusignconnect@0.1.0

import org.accordproject.contract@0.2.0.Contract from https://models.accordproject.org/accordproject/contract@0.2.0.cto
import org.accordproject.runtime@0.2.0.{Request,Response,State,Obligation} from https://models.accordproject.org/accordproject/runtime@0.2.0.cto
import com.docusign.connect@0.4.0.DocuSignEnvelopeInformation from https://models.accordproject.org/docusign/connect@0.4.0.cto
import com.docusign.connect@0.4.0.EnvelopeStatusCode from https://models.accordproject.org/docusign/connect@0.4.0.cto

transaction MyResponse extends Response {
  o String output
  o Integer counter
}

event DocuSignNotificationEvent extends Obligation {
  o String title
  o String message
}

asset DocuSignEnvelopeCounterState extends State {
  o Integer counter default=0
}

/**
 * The template model
 */
@template
asset TemplateModel extends Contract {
  /**
   * The status of the envelope to count
   */
  o EnvelopeStatusCode status
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.docusignconnect@0.1.0.DocuSignEnvelopeCounterState
{
    "$class": "org.accordproject.docusignconnect@0.1.0.DocuSignEnvelopeCounterState",
    "counter": 0,
    "$identifier": "9506d621-bdcb-11f1-a198-dd6379e46d92"
}
org.accordproject.runtime@0.2.0.State
{
    "$class": "org.accordproject.runtime@0.2.0.State",
    "$identifier": "9506d620-bdcb-11f1-a198-dd6379e46d92"
}

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": "Completed",
        "envelopeId": "Aliquip nisi commodo laboris.",
        "created": "2026-10-01T19:09:10.144Z",
        "sent": "2026-10-01T19:09:10.144Z",
        "delivered": "2026-10-01T19:09:10.144Z",
        "signed": "2026-10-01T19:09:10.144Z",
        "completed": "2026-10-01T19:09:10.144Z",
        "declined": "2026-10-01T19:09:10.144Z",
        "email": "Lorem sit eiusmod magna."
    },
    "recipients": [
        {
            "$class": "com.docusign.connect@0.4.0.Recipient",
            "status": "Delivered",
            "email": "Aliquip quis ad.",
            "userName": "Veniam minim enim amet.",
            "sent": "2026-10-01T19:09:10.144Z",
            "delivered": "2026-10-01T19:09:10.144Z",
            "signed": "2026-10-01T19:09:10.144Z",
            "declined": "2026-10-01T19:09:10.144Z",
            "declineReason": "Incididunt nostrud ad amet do.",
            "tabStatuses": [
                {
                    "$class": "com.docusign.connect@0.4.0.NumberTabStatus",
                    "tabName": "Lorem exercitation.",
                    "tabValue": 114.558,
                    "tabType": "DateSigned",
                    "status": "Ex.",
                    "tabLabel": "Minim laboris eiusmod magna aliqua.",
                    "originalValue": "Amet exercitation.",
                    "signed": "2026-10-01T19:09:10.144Z",
                    "customTabType": "Text"
                }
            ]
        }
    ],
    "customFields": [
        {
            "$class": "com.docusign.connect@0.4.0.CustomField",
            "name": "Labore incididunt ut et.",
            "value": "Tempor."
        }
    ],
    "attachments": [
        {
            "$class": "com.docusign.connect@0.4.0.Attachment",
            "docType": "SignerAttachment",
            "identifier": "6885",
            "name": "Exercitation et ea laboris.",
            "mimeType": "Amet ullamco.",
            "encoding": "base64",
            "$identifier": "6885"
        }
    ],
    "$timestamp": "2026-10-01T19:09:10.144Z"
}
org.accordproject.runtime@0.2.0.Request
{
    "$class": "org.accordproject.runtime@0.2.0.Request",
    "$timestamp": "2026-10-01T19:09:10.144Z"
}

Response Types

Type Sample JSON
org.accordproject.docusignconnect@0.1.0.MyResponse
{
    "$class": "org.accordproject.docusignconnect@0.1.0.MyResponse",
    "output": "Elit.",
    "counter": 199,
    "$timestamp": "2026-10-01T19:09:10.146Z"
}
org.accordproject.runtime@0.2.0.Response
{
    "$class": "org.accordproject.runtime@0.2.0.Response",
    "$timestamp": "2026-10-01T19:09:10.146Z"
}

Events Types

Type Sample JSON
org.accordproject.docusignconnect@0.1.0.DocuSignNotificationEvent
// sample generation failed: No concrete extending type for "concerto@1.0.0.Participant".

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.