SharePoint Online is a powerful DMS (versioning, metadata, workflows). Acumatica is the ERP system of record. This integration routes documents through SharePoint libraries, enforces approval and metadata, and only publishes validated documents into Acumatica.
Overview
A custom SPFx Library Extension adds two actions to document libraries:
- Get From Acumatica — Fetch attachments from Acumatica into the current library.
- Publish to Acumatica — Push approved SharePoint files into Acumatica as attachments.
All uploaded files are routed through the SharePoint library, reviewed via an approval workflow, and only published to Acumatica after approval—ensuring governance and auditability.
How It Works
Step 1 — Upload & Metadata
When a user uploads a file, default metadata is applied automatically:
- Entity Type (Customer, Vendor, Order, Project, etc.)
- Entity ID
- Document Category
- Status = Draft
Step 2 — Approval Workflow
A Power Automate approval flow handles reviewer assignment, notifications and status changes. Only when the file is Approved does the Publish to Acumatica action become available.
Step 3 — Publish to Acumatica
- SPFx extension invokes the Integration API (Azure Function / App Service)
- API authenticates with Acumatica (OAuth2 / SSO)
- File binary + metadata are posted to Acumatica and attached to the correct entity
- SharePoint status updated to Published and audit log saved
Reverse Sync — Get From Acumatica
The extension can also pull attachments from Acumatica to SharePoint. Workflow:
- Select entity in the UI
- Click Get From Acumatica
- Attachments are downloaded to the current folder with mapped metadata
Architecture (High-level)
Key components:
- SharePoint Online Library — storage, metadata, versioning
- SPFx Library Extension — UI actions, client logic
- Power Automate — approval workflows
- Integration API (Azure) — token handling, Acumatica calls
- Acumatica REST API — attachments & entity metadata
SPFx Library Extension
The SPFx Library Extension is the core interaction layer embedded directly within the SharePoint document library. It provides contextual actions and communicates with Acumatica in real time.
- Get From Acumatica – Fetch documents or metadata from Acumatica into SharePoint.
- Publish to Acumatica – Publish approved files directly to Acumatica using REST APIs.
Authentication is handled using either:
- Azure AD access token (recommended)
- Stored Acumatica OAuth token (where required)
Power Automate
Power Automate is intentionally kept minimal and focused only on business approvals.
- Used exclusively for approval workflows
- No publishing or integration logic
Once the approval is completed:
- File status is updated to Approved
- The Publish to Acumatica action becomes available in the SPFx extension
Azure Function (Optional)
An Azure Function can be introduced if additional security or backend validation is required.
Typical use cases include:
- IP-restricted Acumatica environments
- Backend token handling
- Additional validation or logging
If Acumatica allows direct client-to-API communication, this layer can be skipped.
End-to-End Flow
The overall document flow is simple, auditable, and approval-driven:
- User uploads a document to the SharePoint Library
- Approval workflow runs via Power Automate
- After approval, SPFx Extension enables publishing
- SPFx Extension calls Acumatica REST API (directly or via Azure Function)
User → SharePoint Library → SPFx Extension → (Optional Azure Function) → Acumatica REST API
Business Benefits
- Governance: Only approved documents reach ERP.
- Consistency: Metadata normalization for better search & reporting.
- Auditability: Version history, approver details and workflow logs.
- Process Control: Centralized ingestion point for all company uploads.
- Compliance: Documents validated before ERP consumption.
- Clear separation of concerns
- Secure and governed document publishing
- No unnecessary backend dependency
- Better user experience within SharePoint
Common Use Cases
- Invoice and Finance document validation before publish
- Purchase / Sales attachments (POs, Delivery Notes)
- QC Reports and Certificates—approved prior to upload
- Vendor and Customer contract lifecycle management
- Project documentation and technical drawings
Implementation Notes
- Security: Keep credentials & tokens in a secure server-side store. Do not store refresh tokens in browser localStorage.
- API: Integration API should handle retries, throttling and token refresh.
- UX: Display publish status and last-synced timestamp on the file card.
- Audit: Log every publish and retrieval action with user context for compliance.
Conclusion
Making SharePoint the document gateway for Acumatica provides strong governance, better collaboration, and a single controlled ingestion point. By using SPFx library extensions, Power Automate approval workflows, and a secure integration API, organizations ensure only validated, metadata-rich documents enter the ERP—reducing errors and improving compliance.

No comments:
Post a Comment