SAP B1 → Email Document + Approval Request Round-Trip
On document add/update, render the layout to a PDF (via an external print service — Service Layer cannot run Crystal), email it via Graph API/SMTP with the PDF attached, then surface any pending B1 ApprovalRequest to the approver with approve/reject links that PATCH the approval request back in SAP B1.
Steps in this flow
- B1: Document Add/Update
- Guard: Document Key
- SL GET: Document + BP Email
- Render Layout via Print Service (external)
- Graph API: Send Email + PDF
- SL GET: Pending ApprovalRequests
- Approver Decision (approve/reject)
- SL PATCH: Approve
- SL PATCH: Reject