.png)

DocuSign Integration Guide
Connect DocuSign agreement workflows with enterprise applications through REST APIs, configured event notifications, OAuth 2.0, and orchestrated document processes.
DocuSign integration options at a glance
DocuSign’s versioned REST APIs provide the primary integration method for creating envelopes, managing recipients and documents, using templates, retrieving statuses, and downloading completed agreement files. DocuSign Connect and envelope-level event notifications provide configured notifications for selected envelope, recipient, and document events. OAuth 2.0 supports authorization code and JWT grant patterns, with account context, scopes, consent, and user permissions determining access. Bulk envelope capabilities support recurring or high-volume signing processes. Martini can consume these APIs, receive supported callbacks through API endpoints and workflows, map document and business data, apply rules, and coordinate status reconciliation.
| Integration point | Supported by DocuSign? | Common use cases | How Martini supports it |
|---|---|---|---|
| REST APIs | Yes | The versioned eSignature REST API supports envelopes, documents, recipients, templates, users, accounts, folders, signing experiences, and agreement status operations. | Martini can consume the DocuSign REST API from workflows, apply mappings and business rules, and expose reusable API-led integration assets. |
| Webhooks and outbound callbacks | Limited | DocuSign Connect and envelope-level event notifications can report configured envelope, recipient, and document events such as sent, delivered, completed, declined, or voided. | Martini can expose an API endpoint or use a webhook-consuming workflow to validate notifications, deduplicate them, and retrieve authoritative envelope data. |
| Bulk / async / batch APIs | Yes | Bulk envelope capabilities support recurring notices, policy acknowledgments, renewals, and other high-volume signing campaigns. | Martini can read recipient sources, map template data, submit bulk or controlled batches, persist envelope identifiers, and reconcile later results. |
| File / attachment APIs | Yes | Documents and supporting files can be uploaded with envelopes and downloaded from existing or completed envelopes, including certificates of completion. | Martini can transform and route binary content while preserving document IDs, names, MIME types, ordering, and correlation metadata. |
| Authentication | Yes | DocuSign supports OAuth 2.0 authorization code and JWT grants with scopes, consent, account context, and user permissions. | Martini can store credentials and keys securely, manage authenticated API calls, and separate developer/demo and production configuration. |
| SOAP APIs | Legacy | Historical DocuSign SOAP or web-service interfaces may support legacy implementations, but REST APIs are recommended for new integrations. | Martini can consume SOAP services where a confirmed legacy DocuSign implementation requires them, subject to endpoint and availability validation. |
| Database / analytics access | No | No general-purpose direct DocuSign database access was confirmed. Operational data should be obtained through APIs, Connect, or an application-owned datastore. | Martini can populate an application-owned database from REST responses and notifications for reporting, reconciliation, and downstream processing. |
How DocuSign exposes data and business events
DocuSign REST APIs
DocuSign’s versioned REST APIs are the primary mechanism for creating and sending Envelopes, using Templates, managing Documents and Recipients, retrieving statuses, and downloading completed agreement files.
Martini implementation pattern
Martini workflows authenticate to DocuSign, construct requests from canonical business data, call the relevant REST resources, validate responses, persist envelope identifiers, and route results or failures to downstream systems.
Implementation sequence
DocuSign Connect notifications
DocuSign Connect and envelope-level event notifications provide configured notifications for selected envelope, recipient, and document events. Coverage depends on the configured event types and integration mode.
Martini implementation pattern
Martini exposes an API endpoint or webhook workflow to receive the notification, validates and deduplicates it, then retrieves the current Envelope and related Documents from DocuSign before applying downstream changes.
Implementation sequence
DocuSign bulk envelopes
DocuSign bulk envelope capabilities support high-volume sending from a common Envelope definition, such as recurring notices, renewals, or policy acknowledgments.
Martini implementation pattern
Martini reads a controlled recipient source, maps each item to a Template or envelope definition, submits a bulk or controlled batch, records returned identifiers, and reconciles outcomes through notifications or scheduled API queries.
Implementation sequence
DocuSign document APIs
DocuSign supports supplying Documents with envelopes and downloading completed Documents and certificates of completion after an agreement reaches the required status.
Martini implementation pattern
Martini transforms files from a database, file share, storage service, or API into DocuSign document payloads and routes completed binary content to repositories or downstream applications while preserving required metadata.
Implementation sequence
Common DocuSign integration patterns
Pattern 1: Send agreements from a sales opportunity
When to use this pattern
Use this pattern when an approved sales or contract record should initiate a DocuSign signing process and the originating application must receive progress and completion status.
Integration direction
Example Mapping
| DocuSign Field | Canonical Field | Target Field |
|---|---|---|
| Salesforce Opportunity.Id | businessReference | Envelope custom field |
| Salesforce Account.Name | customerName | Envelope or tab value |
| Salesforce Contact.Email | signerEmail | Recipient.email |
| Contract document | agreementDocument | Document.documentBase64 |
Martini implementation pattern
Martini receives the approved request, validates required commercial and recipient data, selects a DocuSign Template, maps Recipients, tabs, and Documents, and creates the Envelope. It stores the envelopeId before returning success and uses Connect notifications or reconciliation queries to update Salesforce. Retries use the correlation key and persisted state to avoid duplicate envelopes.
Martini capabilities used
- workflows
- API consumption
- data mapping
- business rules
- error handling
Pattern 2: Archive completed agreements
When to use this pattern
Use this pattern when completed DocuSign Documents and certificates of completion must be stored in a controlled repository and linked to the source contract or request.
Integration direction
Example Mapping
| DocuSign Field | Canonical Field | Target Field |
|---|---|---|
| Envelope.envelopeId | agreementId | SharePoint metadata |
| Envelope.status | agreementStatus | Contract status |
| Completed Document | signedAgreementFile | SharePoint file content |
Martini implementation pattern
A configured DocuSign notification starts a Martini workflow. The workflow validates and deduplicates the callback, retrieves the authoritative Envelope and completed Documents, preserves file metadata, uploads the content to SharePoint, and records the repository reference. Failed downloads or uploads are retried without repeating successful archival operations.
Martini capabilities used
- API consumption
- webhook receiving
- file handling
- data mapping
- idempotency
- error handling
Pattern 3: Track onboarding signatures
When to use this pattern
Use this pattern for employee or customer onboarding processes where a business application supplies data, DocuSign collects signatures, and completion updates the onboarding record.
Integration direction
Example Mapping
| DocuSign Field | Canonical Field | Target Field |
|---|---|---|
| Workday Worker ID | subjectId | Envelope custom field |
| Worker legal name | signerName | Recipient.name |
| Onboarding form | onboardingDocument | Document.documentBase64 |
Martini implementation pattern
Martini receives onboarding data, selects the appropriate Template, maps recipient roles and form fields, and sends the Envelope. On completion, it verifies the current DocuSign status, retrieves signed Documents where required, and updates the onboarding process. Validation failures are rejected before submission and transient API failures follow controlled retries.
Martini capabilities used
- workflows
- API consumption
- data transformation
- business rules
- secure configuration
- retry handling
Pattern 4: Run recurring bulk signing campaigns
When to use this pattern
Use this pattern for recurring notices, renewals, acknowledgments, or other high-volume signing campaigns driven by a database or file.
Integration direction
Example Mapping
| DocuSign Field | Canonical Field | Target Field |
|---|---|---|
| Recipient.externalId | recipientReference | Envelope custom field |
| Recipient.email | signerEmail | Recipient.email |
| Renewal date | effectiveDate | Template tab value |
Martini implementation pattern
A scheduled Martini workflow reads a controlled source list, validates each item, maps it to a DocuSign Template, and submits bulk or controlled envelope requests with throttling. It persists every envelopeId and source identifier, isolates rejected items, and reconciles status through Connect notifications or paginated REST queries.
Martini capabilities used
- scheduled workflows
- bulk orchestration
- API consumption
- mapping
- pagination
- rate control
- monitoring
Applications commonly integrated with DocuSign
DocuSign can be connected with sales, service, HR, ERP, and document-management applications to initiate agreements, synchronize signing status, and archive completed documents. Martini can coordinate these flows through APIs, callbacks, mappings, and reusable workflows.
| Application | Scenario | Direction | Martini Pattern |
|---|---|---|---|
| Salesforce | Generate agreements from Opportunities, Accounts, and Contacts, then write envelope status and completed agreement references back to the originating sales record. | Salesforce → Martini → DocuSign → Martini? | Receive an approved opportunity or contract request, select a DocuSign Template, map recipients, tabs, and documents, create the Envelope, persist the envelopeId, and process completion or exception notifications back into Salesforce. |
| Microsoft Dynamics 365 | Send quotes, order forms, and contracts for signature while updating the related sales or customer record after completion. | Microsoft Dynamics 365 → Martini → DocuSign | Expose or consume a Dynamics 365 request, transform customer and transaction data into a DocuSign envelope definition, store correlation data, and reconcile the final status through Connect or REST queries. |
| ServiceNow | Route employee, vendor, customer, or approval documents for signature and associate the completed agreement with a request or workflow record. | ServiceNow → Martini → DocuSign | Trigger a Martini workflow from the ServiceNow process, validate required fields, create or send the Envelope, and update ServiceNow after retrieving authoritative status and documents. |
| NetSuite | Send sales orders, statements of work, or vendor documents for signature and record completion against transactions or customers. | NetSuite → Martini → DocuSign | Map NetSuite transaction data to a DocuSign Template or envelope, retain the envelopeId with the transaction identifier, and use callbacks or scheduled reconciliation to update NetSuite. |
| Workday | Support employee onboarding, changes, and other HR processes that require signed documents. | Workday → Martini → DocuSign | Receive onboarding data, select the appropriate Template, populate recipient roles and document fields, send the Envelope, and archive or report completion to Workday or an internal datastore. |
| SharePoint | Archive completed Documents and certificates of completion in controlled contract or employee-document libraries. | DocuSign → Martini → SharePoint | Receive a configured completion notification, retrieve the completed Documents and certificate from DocuSign, preserve file metadata, and upload the files to the target SharePoint library. |
| HubSpot | Trigger agreements from deals or lifecycle events and write signing status back to the deal or contact context. | HubSpot → Martini → DocuSign | Consume a HubSpot event or request, map deal and contact fields to recipients and tabs, create the Envelope, and update HubSpot after verified DocuSign status changes. |
| Box | Store signed agreements and supporting documents in a document-management repository. | DocuSign → Martini → Box | Use a completion workflow to retrieve DocuSign documents, validate the envelope and file metadata, and write the binary content to the appropriate Box folder with correlation details. |
How to build a DocuSign integration in Martini
Objective
Establish the DocuSign API connection with the correct environment, account context, OAuth grant, scopes, and permissions.
Instructions in Martini
- Configure the developer/demo and production endpoints separately
- Choose authorization code or JWT according to the operating model
- Store client credentials, RSA private keys, refresh tokens, and account identifiers in secure configuration
- Confirm the API user can access the required account, Templates, Envelopes, and Documents
Objective
Select the event, API request, or schedule that should start the integration workflow.
Instructions in Martini
- Use an inbound API or application event for agreement initiation
- Use a DocuSign Connect notification for selected envelope lifecycle changes
- Use a scheduler for reconciliation, pagination, or recurring bulk campaigns
- Define a business correlation key before processing
Objective
Collect the source business data, files, recipient details, or authoritative DocuSign status needed by the process.
Instructions in Martini
- Read the source application or database data
- Retrieve current Envelope and Document data after a callback
- Process paginated API results until the required scope is complete
- Preserve envelopeId, document identifiers, and source references
Objective
Coordinate DocuSign calls, downstream operations, state changes, and exception paths in a maintainable Martini workflow.
Instructions in Martini
- Separate initiation, notification, retrieval, and reconciliation logic where appropriate
- Use conditional routing for completed, declined, voided, and failed states
- Persist state before or immediately after external submission
- Design callback processing to tolerate retries and out-of-order notifications
Objective
Translate application data into DocuSign Envelopes, Templates, Recipients, tabs, and Documents, or transform DocuSign results into downstream models.
Instructions in Martini
- Map stable Template roles and tab names rather than positional assumptions
- Preserve binary content, MIME types, names, IDs, and document ordering
- Normalize statuses into the organization’s canonical agreement lifecycle
- Validate required fields and reject incomplete requests before sending
Objective
Enforce business and operational rules before creating agreements or updating downstream systems.
Instructions in Martini
- Check recipient eligibility, account access, and required approvals
- Prevent duplicate Envelope creation using persisted correlation data
- Compare received status with persisted status to prevent backward lifecycle movement
- Apply throttling and batch limits for high-volume submissions
Common DocuSign data objects used in integrations
| Object | Typical Use | Common target systems | Martini handling |
|---|---|---|---|
| Accounts | Identify the DocuSign account context that owns users, envelopes, settings, and API configuration. | Salesforce, NetSuite, ServiceNow, internal configuration stores | Martini includes the account ID and permissions context in API configuration and validates that the API user can access the target account. |
| Envelopes | Represent agreement transactions containing documents, recipients, routing, statuses, and audit information. | Salesforce, Microsoft Dynamics 365, ServiceNow, NetSuite, Workday | Martini creates, sends, retrieves, and reconciles Envelopes while storing envelopeId, business correlation keys, status, and timestamps for idempotency. |
| Documents | Contain contracts, forms, supporting files, signed documents, and certificates of completion. | SharePoint, Box, databases, file storage, downstream APIs | Martini maps document payloads and routes binary content while preserving names, MIME types, IDs, ordering, and completion artifacts. |
| Recipients | Define signers, carbon-copy recipients, certified-delivery recipients, and other envelope participants. | Salesforce, HubSpot, Workday, Microsoft Dynamics 365 | Martini maps source contacts and roles to DocuSign recipient definitions, validates required routing data, and processes recipient status changes. |
| Templates | Provide reusable envelope definitions containing documents, tabs, recipient roles, and workflow configuration. | Salesforce, NetSuite, Workday, internal agreement processes | Martini retrieves or selects Templates, maps stable role and tab names, and isolates template-specific transformations from canonical business data. |
| Users | Represent account users who may create, send, manage, or act on behalf of Envelopes subject to permissions. | Identity and access processes, internal administration stores | Martini uses the configured API user and permitted impersonation context, while checking permissions and account access during authenticated calls. |
Authentication and security considerations
OAuth 2.0 and account context
DocuSign uses OAuth 2.0 with authorization code and JWT grant patterns. API calls require the correct account context, scopes, consent, and user permissions.
Credential protection
Store client secrets, RSA private keys, refresh tokens, and account identifiers in Martini secured configuration rather than workflow logic. Separate developer or demo credentials from production credentials.
Callback validation
Validate incoming Connect or envelope notification requests, reject malformed payloads, prevent replay and duplicate processing, and retrieve authoritative data from DocuSign before sensitive updates.
Operational considerations for DocuSign integrations
Rate limits and retries
Queue or rate-control bulk workloads and use exponential backoff for throttling and transient failures. Avoid short-interval polling when configured Connect notifications can provide lifecycle signals.
Pagination and reconciliation
List operations can be paginated or constrained by date and status. Process all pages, persist watermarks where appropriate, and use scheduled reconciliation for critical agreement states.
Idempotency and status ordering
Use envelopeId and a business correlation key to prevent duplicate submissions. Notifications may be retried or arrive out of order, so compare received statuses with persisted lifecycle state.
Documents and schema changes
Preserve document IDs, names, MIME types, ordering, and binary content. Treat Template roles, tabs, and custom fields as versioned contracts and isolate DocuSign transformations from downstream models.
Why use Martini instead of scripts or point-to-point integrations?
Orchestration beyond a script
Martini coordinates DocuSign API calls, callback processing, file movement, business rules, persistence, and downstream updates in maintainable workflows rather than isolated scripts.
Reusable integration assets
Martini can expose normalized APIs, reuse mappings and workflow logic, and separate DocuSign-specific payload handling from canonical enterprise data models.
Operational control
Centralized validation, correlation, retries, throttling, logging, and error handling make envelope and document processes easier to monitor and support than point-to-point implementations.
Frequently asked questions
DocuSign is primarily integrated through its versioned eSignature REST APIs for Envelopes, Documents, Recipients, Templates, Users, and account resources. DocuSign Connect and envelope-level event notifications can report selected lifecycle events, while OAuth 2.0 authorization code and JWT grants provide authenticated access. Bulk envelope capabilities support high-volume signing processes.
Yes. Martini can consume DocuSign REST APIs, authenticate with the documented OAuth 2.0 methods, receive supported DocuSign Connect or envelope event notifications, orchestrate signing workflows, and route completed Documents to downstream systems.
No dedicated DocuSign connector is required. Martini can integrate using DocuSign’s confirmed native mechanisms, including REST APIs, OAuth 2.0 authentication, configured Connect or envelope callbacks, bulk envelope operations, and document APIs.
Lonti does not charge an additional per-connector or per-vendor fee to integrate DocuSign. The integration is subject to the provisioned capacity of the Martini environment. Separate DocuSign, infrastructure, storage, or other third-party costs may apply depending on subscriptions, usage, and deployment model.
New implementations should generally use the DocuSign eSignature REST API with OAuth 2.0. Connect or envelope notifications are useful for selected lifecycle events, bulk envelope capabilities support high-volume processes, and document APIs handle uploads and completed-file retrieval. Historical SOAP interfaces should be treated as legacy and validated for any specific existing implementation.
DocuSign supports DocuSign Connect and envelope-level event notification callbacks for configured event types. Coverage is not an unrestricted event stream, so Martini should validate and deduplicate notifications, then retrieve the authoritative Envelope status before making sensitive downstream changes.
Persist the envelopeId, source business identifier, processing state, and relevant status information. Use notifications as triggers and combine them with scheduled REST API reconciliation for critical processes. Martini workflows can use idempotency checks, pagination, status comparisons, and controlled retries to prevent duplicate Envelopes or repeated downstream updates.
Yes. Martini can expose a controlled REST API that accepts an internal agreement request, applies validation and business rules, calls DocuSign, and returns a normalized response. This can shield internal consumers from DocuSign-specific payloads while centralizing authentication, mappings, correlation, and error handling.
Related Martini documentation
Mapping and Data
Security and Operations
Connect DocuSign with your enterprise workflows
Use Martini to orchestrate DocuSign APIs, configured event notifications, document processing, and downstream system updates in a maintainable integration architecture.