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.
| Action | Available From |
|---|---|
| Generate Document | Command Bar - record form and list view |
| Open Document | Command Bar - record form |
| Send for Signature | Initiated via Generate Document with workflow enabled |
| Sync Workflow Status | Command Bar - record form |
| Get Signed Document | Command 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)Capabilities at a Glance
| Capability | Description | Use Case |
|---|---|---|
| PDF Generation | Render formatted PDFs from any CRM record using configurable templates | Quotes, proposals, contracts, account summaries |
| SharePoint Storage | Automatically upload generated PDFs and JSON payloads to SharePoint | Compliance document retention, team document access |
| E-Signature | Route documents to signers sequentially or in parallel through the Vault Platform engine | Contracts, agreements, NDAs |
| Approval Workflows | Trigger validation workflows with configurable enforcement (warn or block CRM operations) | Quote activation, opportunity closure, order fulfilment |
| Document Links | Every generated document links back to its CRM source record for easy access and full lifecycle traceability from the Vault Lifecycle portal | Audit trail from CRM record to SharePoint PDF |
| Batch Processing | Generate multiple PDFs from a list view selection in a single operation | Bulk 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.Allpermission (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:
-
Graph API App Registration (for SharePoint access)
- Application (client) ID
- Client secret
- API permissions:
Sites.ReadWrite.Allwith admin consent
-
Microsoft Graph Identifiers
- Tenant ID
- SharePoint Drive ID for the output document library
- SharePoint Drive ID for the templates library
-
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_InitializeDefaultsandvault_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 role | Why |
|---|---|
| All users who generate documents | Required to generate documents and view document links on CRM records |
| Administrators configuring templates | Required 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 Variable | Where to Find It |
|---|---|
vault_graph_tenantid | Azure Portal → Azure Active Directory → Overview → Tenant ID |
vault_graph_clientid | Azure Portal → App Registrations → your app → Application (client) ID |
vault_graph_clientsecret | Azure Portal → App Registrations → your app → Certificates & Secrets → create a secret and copy the Value |
vault_graph_driveid | Microsoft Graph Explorer: GET /sites/{siteId}/drives → copy the id of the output document library |
vault_graph_templatesdriveid | Microsoft Graph Explorer: GET /sites/{siteId}/drives → copy the id of the templates document library |
vault_graph_templatessourcefolder | Folder 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 Variable | Description |
|---|---|
vault_dispatcher_baseurl | Dispatcher base URL, e.g. https://func-vaultpdf.azurewebsites.net/api |
vault_dispatcher_tenantid | Azure AD Tenant ID for the Dispatcher's OAuth token |
vault_dispatcher_clientid | Azure AD Client ID for the Dispatcher's OAuth token |
vault_dispatcher_clientsecret | Azure 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 Variable | Default | Description |
|---|---|---|
vault_batchwarningthreshold | 25 | Records above this count trigger a confirmation dialog before batch processing |
vault_batchmaxthreshold | 100 | Records 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.
| Field | Description |
|---|---|
| Name | Human-readable template name, e.g. Quote - Standard |
| Entity Logical Name | The CRM entity this template applies to, e.g. quote, opportunity, account |
| Template Variant ID | SharePoint path to the .vpdf template file in the templates library, e.g. CRM/Quote/default-quote.vpdf |
| Dispatch Mode | Standard for single records; Per Record or Single Array for batch |
| Is Active | Must 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.
| Field | Description |
|---|---|
| Name | Descriptive label for this mapping, e.g. Quote Name |
| Template | Select the template created in the previous step |
| CRM Field Name | Exact field logical name on the CRM entity, e.g. name, totalamount |
| Placeholder Key | The key in the Vault payload JSON, e.g. documentTitle, totalAmount |
| Section Type | Header, Line, or Footer — controls where this field appears in the payload |
| JSON Group | Optional nesting key for grouped fields, e.g. billing, shipping |
| Sequence Number | Controls 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.
| Field | Description |
|---|---|
| Template | The template to assign |
| Entity Logical Name | Must match the template's entity |
| Context | form - 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.
| Field | Description |
|---|---|
| Template | The template for this signer |
| Email Field Name | Logical 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 Name | Logical name of the CRM field holding the signer's display name, e.g. fullname |
| Signer Role | e.g. Signer, Witness, Approver |
| Sequence Number | Signing 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:
| Mode | Behaviour |
|---|---|
None | Informational only - workflow state is tracked but does not block CRM operations |
Validate | Warning shown if a pending workflow is detected |
Block | CRM 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.
- The Template Gallery opens - showing all templates assigned to this entity
- Select the template and click Generate
- Vault builds the CRM payload, uploads it to SharePoint, and calls the Dispatcher
- The Dispatcher renders the PDF, stores it in SharePoint, and returns a blob path
- 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 count | Behaviour |
|---|---|
| ≤ 25 records | Processes immediately with no confirmation |
| 26–100 records | Confirmation dialog: "You are about to generate documents for N records. Continue?" |
| > 100 records | Blocked: "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.
| Entity | Single Record Use Case | Batch Use Case |
|---|---|---|
| Quote | Quote PDF for a customer - pricing summary, proposal | Bulk quote pack for a campaign or sales cycle |
| Opportunity | Proposal, pitch document, NDA, engagement letter | Batch proposals for a pipeline stage |
| Account | Account summary, contract, renewal agreement | Batch statements, renewal notices |
| Contact | Personalised communication, welcome letter | Bulk mailer for a segment |
| Order | Sales order confirmation | Batch order pack |
| Invoice | Invoice PDF (when D365 Sales invoicing is enabled) | Batch invoice run |
| Case | Case summary, resolution letter | Batch case closure reports |
| Lead | Lead information pack, GDPR consent document | Batch 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
Troubleshooting - VaultPDF Business Central
Diagnose and resolve common VaultPDF issues. Permission errors, authentication failures, SharePoint connectivity, template problems, and batch operation failures.
Developer Guide - Vault Platform for Dynamics 365 Sales
Technical architecture, detailed action flows, Dataverse table schemas, Custom API and plugin reference, batch dispatch modes, workflow enforcement, and deployment/ALM for the Vault Platform CRM integration.