Vault Platform for Dynamics 365 Sales

Vault Platform for Dynamics 365 Sales

Complete integration guide for Dynamics 365 Sales consultants and developers. Install, configure, and use VaultPDF with on-demand PDF generation, SharePoint storage, e-signature workflows, and audit trails - directly from CRM records.

Overview

Vault Platform extends Microsoft Dynamics 365 Sales with enterprise-grade document capabilities. Sales users generate PDFs directly from CRM records - Quotes, Opportunities, Accounts, Contacts, and more - without leaving Dynamics 365. Documents are stored in SharePoint, can be routed for approval or e-signature, and every lifecycle event is captured in an auditable record.

Key characteristics:

  • Schema-driven rendering - Templates are JSON definitions that map CRM field data to PDF layouts
  • In-tenant processing - All PDF generation runs inside the customer's Azure environment; payloads never leave the customer's Microsoft 365 tenant
  • SharePoint integration - Documents store natively in SharePoint via Microsoft Graph
  • Native CRM actions - Command Bar buttons on forms and list views trigger document processing without leaving Dynamics 365
  • Pull model - CRM polls the Dispatcher for workflow status; Dispatcher never writes back to Dataverse
  • Flexible workflows - Sequential or parallel approval and e-signature routing with audit capture

Native Dynamics 365 Sales Integration

All five document operations are available directly from the Dynamics 365 Command Bar - no Power Automate flows, no portal switching, no external tools required.

ActionAvailable From
Generate DocumentCommand Bar - record form and list view
Open DocumentCommand Bar - record form
Send for SignatureInitiated via Generate Document with workflow enabled
Sync Workflow StatusCommand Bar - record form
Get Signed DocumentCommand Bar - record form

Source-System Native Experience

  • Command Bar Actions on every supported entity
  • Metadata-Driven Templates - no code changes to add document types
  • SharePoint Document Storage via Microsoft Graph
  • Native Workflow Tracking with configurable enforcement
  • One-Click VaultESign
  • No Document Content Egress - payloads never leave the customer's tenant
  • Audit and Evidence Tracking on every lifecycle event

The Command Bar initiates operations through a Custom Dataverse API. Business logic executes server-side within Dataverse plugins - no document generation logic runs in the browser.


Architecture Overview

The Vault Platform for Dynamics 365 Sales runs entirely within the customer's environment. Processing is server-side - the Command Bar buttons are the only user-facing touchpoint; no Power Automate flows are involved.

Dynamics 365 Sales
  Command Bar Buttons
  [Process Document] [Open Document]
  [Sync Workflow Status] [Get Signed Document]


  Vault CRM Integration  (server-side, runs within Dataverse)
  ├── Reads template and field mapping configuration
  ├── Reads CRM record data
  ├── Uploads record payload to SharePoint (Microsoft Graph)
  └── Calls Vault Dispatcher - PDF rendered and stored in SharePoint


  Vault Dispatcher
  (PDF rendering, workflows,
   e-signatures, delivery)
Dynamics 365 Sales remains the authoritative CRM system. Vault Platform provides document generation, SharePoint storage, workflow routing, and audit services without taking ownership of CRM data. Workflow status is always user-triggered - there is no background sync or callback into Dynamics 365.

Capabilities at a Glance

CapabilityDescriptionUse Case
PDF GenerationRender formatted PDFs from any CRM record using configurable templatesQuotes, proposals, contracts, account summaries
SharePoint StorageAutomatically upload generated PDFs and JSON payloads to SharePointCompliance document retention, team document access
E-SignatureRoute documents to signers sequentially or in parallel through the Vault Platform engineContracts, agreements, NDAs
Approval WorkflowsTrigger validation workflows with configurable enforcement (warn or block CRM operations)Quote activation, opportunity closure, order fulfilment
Document LinksEvery generated document links back to its CRM source record for easy access and full lifecycle traceability from the Vault Lifecycle portalAudit trail from CRM record to SharePoint PDF
Batch ProcessingGenerate multiple PDFs from a list view selection in a single operationBulk quote packs, batch proposals, statement runs

Prerequisites

Before installation, ensure the following are in place:

Environment Requirements

  • Dynamics 365 Sales (any current release with Dataverse)
  • Microsoft 365 tenant with Azure AD
  • Azure App Registration with Microsoft Graph Sites.ReadWrite.All permission (admin-consented)
  • SharePoint site with at least one document library for PDF output and one for templates
  • Vault Dispatcher deployed in the customer's Azure subscription

Required Credentials and Configuration

Prepare the following before starting installation:

  1. Graph API App Registration (for SharePoint access)

    • Application (client) ID
    • Client secret
    • API permissions: Sites.ReadWrite.All with admin consent
  2. Microsoft Graph Identifiers

    • Tenant ID
    • SharePoint Drive ID for the output document library
    • SharePoint Drive ID for the templates library
  3. Dispatcher Credentials (provided by Refract Logic)

    • Dispatcher base URL
    • Dispatcher Tenant ID, Client ID, and Client Secret

Dispatcher Dependency

The Dispatcher is a separately deployed Azure Function hosted by VaultPDF. It must be provisioned before you can generate PDFs. Contact [email protected] to arrange deployment and receive connection credentials.


Installation

The entire Vault Platform for Dynamics 365 Sales ships as a single managed solution. There is no per-entity installation - all entities are supported by the same solution from the moment it is imported.

Import the Managed Solution

In the Power Platform Admin Center, select the target environment and navigate to Solutions.

Click Import solution and upload the VaultPlatform_D365Sales.zip managed solution file provided by Refract Logic.

The import adds:

  • Custom Dataverse tables for template configuration and document tracking
  • Command Bar buttons on all eight supported CRM entities (Quote, Opportunity, Account, Contact, Order, Invoice, Case, Lead)
  • The Vault User security role
  • Twelve Environment Variables (populated in the next step)
  • Two admin Custom APIs: vault_InitializeDefaults and vault_ValidateSettings

No Restart Required

Dynamics 365 loads the solution immediately after import. Command Bar buttons appear on the next page refresh. No server restart is needed.

Assign the Vault User Security Role

Navigate to Settings → Security → Users in Dynamics 365 and open each user's record.

In the Security Roles section, assign the Vault User role included in the managed solution.

Who needs the roleWhy
All users who generate documentsRequired to generate documents and view document links on CRM records
Administrators configuring templatesRequired to access vault_ tables in Power Apps

Role Required Before First Use

Users without the Vault User security role receive an access error when clicking any Command Bar button. Assign the role before the user's first session.

Verify the Solution

In Power Platform Admin Center → Solutions, confirm VaultPlatform D365 Sales is listed with status Installed.

Open the target Dynamics 365 environment and navigate to a Quote or Opportunity record. Confirm the Process Document, Open Document, Sync Workflow Status, and Get Signed Document buttons appear in the Command Bar.


Initial System Setup

All connection credentials are stored as Dataverse Environment Variables included in the managed solution. These must be populated before the integration can process any documents.

Configure Environment Variables

In Power Platform Admin Center, open the target environment and navigate to Solutions → VaultPlatform D365 Sales → Environment variables.

Populate all eight variables:

Configure Microsoft Graph (SharePoint Access)

Environment VariableWhere to Find It
vault_graph_tenantidAzure Portal → Azure Active Directory → Overview → Tenant ID
vault_graph_clientidAzure Portal → App Registrations → your app → Application (client) ID
vault_graph_clientsecretAzure Portal → App Registrations → your app → Certificates & Secrets → create a secret and copy the Value
vault_graph_driveidMicrosoft Graph Explorer: GET /sites/{siteId}/drives → copy the id of the output document library
vault_graph_templatesdriveidMicrosoft Graph Explorer: GET /sites/{siteId}/drives → copy the id of the templates document library
vault_graph_templatessourcefolderFolder path within the templates library where .vpdf files are stored, e.g. /CRM

Azure AD App Permissions

The App Registration must have Sites.ReadWrite.All granted and admin-consented. Without this consent, all SharePoint uploads fail with a 403 Forbidden error.

Configure the Dispatcher Connection

Environment VariableDescription
vault_dispatcher_baseurlDispatcher base URL, e.g. https://func-vaultpdf.azurewebsites.net/api
vault_dispatcher_tenantidAzure AD Tenant ID for the Dispatcher's OAuth token
vault_dispatcher_clientidAzure AD Client ID for the Dispatcher's OAuth token
vault_dispatcher_clientsecretAzure AD Client Secret for the Dispatcher's OAuth token

These credentials are provided by Refract Logic as part of Dispatcher deployment. Contact [email protected] if you have not received them.

Secrets Are Stored Encrypted

Environment Variable secrets are stored encrypted in Dataverse. Their values are not visible in the Power Platform Admin Center after saving.

Configure Batch Thresholds (Optional)

The batch safety thresholds have sensible defaults and do not need to be changed unless your deployment requires different limits.

Environment VariableDefaultDescription
vault_batchwarningthreshold25Records above this count trigger a confirmation dialog before batch processing
vault_batchmaxthreshold100Records above this count are blocked entirely

Leave these empty to use the defaults.


Seed Default Templates

The vault_InitializeDefaults Custom API creates ready-to-use default templates for all eight supported entities in one call. Run this once after configuring environment variables.

In Power Automate or a Custom API test client (e.g. XrmToolBox, Postman with Dataverse auth), call:

Action: vault_InitializeDefaults
Parameters:
  overwriteExisting: false   (set true to regenerate if you want to reset to defaults)

The API creates vault_template, vault_templatefield, and vault_templateassignment records for Quote, Opportunity, Account, Contact, Order, Invoice, Case, and Lead. Use this as a starting point, then customise the templates in the next step.

SharePoint Templates Required

Seeding defaults creates the Dataverse configuration records but does not upload .vpdf template files. Upload matching .vpdf files to your templates SharePoint library at paths like CRM/Quote/default-quote.vpdf, CRM/Opportunity/default-opportunity.vpdf, etc. Contact [email protected] for the default template files.


Template Configuration

Templates define which CRM fields map to which PDF regions, how data is structured, and how the resulting document is routed. Template configuration is stored in six Dataverse custom tables and managed directly via Power Apps or the standard Dynamics 365 table views.

Open Template Tables

Navigate to make.powerapps.com, select your environment, and go to Tables. Search for vault_ to find all Vault Platform tables.

Alternatively, use Advanced Find (the funnel icon in Dynamics 365 Sales) and search within the Vault tables.

The relevant tables are:

  • vault_template — Template definitions (one row per template)
  • vault_templatefield — Field mappings (one row per mapped CRM field)
  • vault_templateassignment — Assignments (which templates appear on which entities)
  • vault_templatesigner — E-signature signer configuration
  • vault_templaterecipient — Delivery and workflow recipient configuration

Create a Template

Create the Template Record

Navigate to Templates and click New.

FieldDescription
NameHuman-readable template name, e.g. Quote - Standard
Entity Logical NameThe CRM entity this template applies to, e.g. quote, opportunity, account
Template Variant IDSharePoint path to the .vpdf template file in the templates library, e.g. CRM/Quote/default-quote.vpdf
Dispatch ModeStandard for single records; Per Record or Single Array for batch
Is ActiveMust be enabled for the template to appear in the gallery

Map CRM Fields

Navigate to Field Mappings and click New for each field you want to include.

FieldDescription
NameDescriptive label for this mapping, e.g. Quote Name
TemplateSelect the template created in the previous step
CRM Field NameExact field logical name on the CRM entity, e.g. name, totalamount
Placeholder KeyThe key in the Vault payload JSON, e.g. documentTitle, totalAmount
Section TypeHeader, Line, or Footer — controls where this field appears in the payload
JSON GroupOptional nesting key for grouped fields, e.g. billing, shipping
Sequence NumberControls field ordering within a section

Finding CRM Field Names

To look up the logical field name for any CRM attribute, navigate to Settings → Customizations → Customize the System in Dynamics 365, open the entity, and select Fields. The Name column shows the logical name (without the publisher prefix for standard fields, e.g. name, totalamount).

Assign the Template to an Entity

Navigate to Template Assignments and click New.

FieldDescription
TemplateThe template to assign
Entity Logical NameMust match the template's entity
Contextform - show only on the record form; view - show only in list views; both - show everywhere

A template must have at least one assignment before it appears in the gallery for end users.

Configure Routing (Optional)

Navigate to vault_templatesigner and click New for each signer.

FieldDescription
TemplateThe template for this signer
Email Field NameLogical name of the CRM field holding the signer's email, e.g. emailaddress1. The Dispatcher resolves this against the CRM record at generation time.
Name Field NameLogical name of the CRM field holding the signer's display name, e.g. fullname
Signer Rolee.g. Signer, Witness, Approver
Sequence NumberSigning order for sequential mode

Enable eSign Enabled on the Template record to activate e-signature routing.

Enable Workflow Enabled on the Template record and set Workflow Enforcement Mode:

ModeBehaviour
NoneInformational only - workflow state is tracked but does not block CRM operations
ValidateWarning shown if a pending workflow is detected
BlockCRM operations (e.g. activating a quote, closing an opportunity) are blocked until workflow is complete

Navigate to Recipients and click New for each workflow recipient. Set Recipient Type to Workflow.

On the Template record, enable Watermark Enabled and set Watermark Text, e.g. CONFIDENTIAL, DRAFT, or FOR SIGNATURE.

The watermark is rendered on every page of PDFs generated from this template.


Processing Documents

Once templates are configured, end users process documents directly from Dynamics 365 using the Command Bar buttons on any supported entity record.

The Four Actions

Click [Process Document] to generate a PDF from the current record.

  1. The Template Gallery opens - showing all templates assigned to this entity
  2. Select the template and click Generate
  3. Vault builds the CRM payload, uploads it to SharePoint, and calls the Dispatcher
  4. The Dispatcher renders the PDF, stores it in SharePoint, and returns a blob path
  5. A success notification appears: "Document generated successfully"

For batch operations, select multiple records in a list view and click Process Document from the view Command Bar. A confirmation dialog appears for large batches.

Click [Open Document] to view a previously generated PDF.

Vault retrieves the generated PDF link stored on the record, requests a short-lived download URL, and opens the PDF in a new browser tab.

Available on the record form only (not list views).

Click [Sync Workflow Status] to check the current state of an in-progress workflow.

Vault checks the current workflow state and displays it in a dialog:

"Workflow: Step 2 of 4 - Awaiting approval from finance@..."

If the workflow is Complete or Rejected, the outcome is saved against the record. Intermediate states are shown to the user only - there is no background sync; this is always a user-triggered action.

Click [Get Signed Document] to retrieve the sealed PDF after a workflow completes.

Vault calls the Dispatcher's export endpoint and opens the sealed, signed PDF in a new browser tab.

Use this after Sync Workflow Status confirms the workflow is Complete.

Batch Operations

Batch processing is triggered from list views. Select the records to process, then click Process Document in the Command Bar.

Record countBehaviour
≤ 25 recordsProcesses immediately with no confirmation
26–100 recordsConfirmation dialog: "You are about to generate documents for N records. Continue?"
> 100 recordsBlocked: "Please select 100 or fewer records per batch."

Thresholds are configurable via Dataverse Environment Variables without a solution update.

Batch Response

For batch operations, the Dispatcher immediately returns an Intake Receipt PDF as acknowledgment and processes the batch asynchronously in the background. The CRM user receives the Intake Receipt in hand immediately - the same experience as generating a single document.


Supported CRM Entities

The managed solution ships with Command Bar customisations for the following entities. Additional entities can be added in a solution update without plugin code changes.

EntitySingle Record Use CaseBatch Use Case
QuoteQuote PDF for a customer - pricing summary, proposalBulk quote pack for a campaign or sales cycle
OpportunityProposal, pitch document, NDA, engagement letterBatch proposals for a pipeline stage
AccountAccount summary, contract, renewal agreementBatch statements, renewal notices
ContactPersonalised communication, welcome letterBulk mailer for a segment
OrderSales order confirmationBatch order pack
InvoiceInvoice PDF (when D365 Sales invoicing is enabled)Batch invoice run
CaseCase summary, resolution letterBatch case closure reports
LeadLead information pack, GDPR consent documentBatch outreach packs

Next Steps

  • Developer Guide - Technical architecture, detailed action flows, Dataverse table schemas, and deployment/ALM reference
  • Troubleshooting Guide - Diagnose and resolve common issues with environment variables, plugins, SharePoint, and workflows

On this page