PR Intercept: Request Creation
Process Diagram
sequenceDiagram actor ERP_User as Business User participant ERP_System as ERP/P2P System participant ERP_Middleware as ERP Middleware participant Fairmarkit_API as Fairmarkit Public API participant Fairmarkit_APP as Fairmarkit System rect rgb(125,125,125,.2) note over ERP_User,Fairmarkit_APP: 1. PR Intercept (Request Creation) ERP_User->>ERP_System: Create new PR note right of ERP_User: The user creates a new PR through the UI/Form in ERP. ERP_System-->>ERP_System: Store new PR locally and initiate approvals note over ERP_System: The system stores the new PR, triggers automated approvals, and selects a sourcing flow. ERP_System ->> ERP_Middleware : Notify that PR is ready to be sourced via FM ERP_Middleware-->>ERP_Middleware: Prepare for FM integration note over ERP_Middleware: The middleware loads required Fairmarkit (FM) UUIDs and builds the FM payload. ERP_Middleware ->> Fairmarkit_API : POST /self-service/api/v4/request/ Fairmarkit_API ->> Fairmarkit_APP : Creates Request through internal API note over Fairmarkit_APP: Validate data and create a new Request in FM's database. Fairmarkit_APP -->> Fairmarkit_API : Response with the payload of a newly Created Request Fairmarkit_API -->> ERP_Middleware: JSON response with Requuest payload ERP_Middleware-->>ERP_Middleware: Process and log the data (optional) note over ERP_Middleware: The middleware parses the payload, logs the data, and shares the Request status update. ERP_Middleware ->> Fairmarkit_API : POST /self-service/api/v4/:request_id/items Fairmarkit_API ->> Fairmarkit_APP : Creates Request Item through internal API note over Fairmarkit_APP: Validate data and create a new Request in FM's database. Fairmarkit_APP -->> Fairmarkit_API : Response with the payload of a newly Created Request Fairmarkit_API -->> ERP_Middleware: JSON response with Requuest payload ERP_Middleware-->>ERP_Middleware: Process and log the data (optional) note over ERP_Middleware: The middleware parses the payload, logs the data, and shares the Request status update. ERP_Middleware ->> ERP_System: Optional - update PR Fairmarkit_APP-->>Fairmarkit_APP: - note over Fairmarkit_APP: Fairmarkit Recommends the Suppliers. end
Process Flow
- The User creates a new Purchase Request (PR) through the UI/Form in ERP.
- The ERP System stores the new PR locally and initiates automated approvals.
- The ERP System notifies the ERP Middleware that the PR is ready to be sourced via Fairmarkit.
- The ERP Middleware prepares for Fairmarkit integration by loading required Fairmarkit (FM) UUIDs and building the FM payload.
- The ERP Middleware sends a POST /api/v4/request/ request to the Fairmarkit API with the Request payload.
- The Fairmarkit App validates the data and creates a new Request in its database.
- The Fairmarkit App sends a response back to the middleware with the payload of the newly created Request.
- The ERP Middleware sends multiple POST /api/v4/requests/:request_id/items request to the Fairmarkit API with the Request Item payload.
- The ERP Middleware processes the Request Item payload, logs the data, and shares the Request status update if needed.
Updated 7 days ago