Handling Transaction Failures in Dataverse Integrations
When Dataverse is integrated with external systems, ensuring consistency between the two systems during failures is critical. Since Dataverse does not have distributed transactions with third-party systems, you need a compensating mechanism and a notification strategy.
1. Failure Notification to External System
-
Use Power Automate or a Plugin to catch transaction failure events.
-
Notify the third-party application via:
-
Service Bus/Event Hub (for async notification)
-
Webhook / Custom API call (for direct notification)
-
-
Ensure the payload includes transaction details, error reason, and correlation ID.
2. Rollback Mechanism (External System Considerations)
Since Dataverse cannot directly roll back in an external system, you must design for compensating transactions:
-
Check if the external system provides rollback APIs (e.g., delete, cancel, or reverse transaction endpoints).
-
If rollback is supported:
-
Call the rollback API when Dataverse transaction fails.
-
-
If rollback is not supported:
-
Define a manual correction or exception handling process in the external system.
-
3. Resume / Retry Mechanism
-
Dataverse Retry:
-
Use Power Automate Retry Policies (fixed interval / exponential backoff).
-
Or implement Azure Durable Functions to orchestrate retries.
-
-
Resume Feature:
-
Store failed transactions in a Dataverse custom entity (Integration Logs).
-
Allow manual or automated resume processing from this log, so you don’t lose track of failures.
-
4. Best Practices
-
Always design with idempotency in mind (external system should handle duplicate requests gracefully).
-
Use correlation IDs across Dataverse and external systems for traceability.
-
Consider compensation logic instead of full rollback, especially if external system has partial success cases.
✅ Summary:
To notify a third-party application about Dataverse transaction failures, use service
Comments
Post a Comment