Skip to content

Synchronous Request

With the synchronous request, the requester will be notified of success or failure at the time of attempting to create a request.


The goal of the Synchronous Request for integrated clients is to allow the requester to validate the success or failure of the request creation directly on the screen.

The user is notified in case of a possible rejection or issue, thus avoiding inconsistent errors that could be detected too late.

How the Synchronous Request Works

In this section, you will be able to review the operation of the synchronous request generally and in detail through the images and description of the steps that will be presented subsequently.

Overview of the Synchronous Request

Figure 1. General Flow of the Synchronous Request

Detailed View of the Synchronous Request

Check the detailed flow of the synchronous request with emphasis on the roles of the Front-end and Back-end. In this image, you can also see the actions that occur in the Client and in the ME.

Figure 2. Detailed Flow of the Synchronous Request

Description of the Synchronous Request Steps

  1. The Requester fills in the request creation data via the screen in the ME;
  2. The Requester waits for the screen return while the ERP/System is trying to connect with the ME;
  3. From this moment on, the ME sends the prerequest.submitted webhook to notify the attempt to create the request to the integrated ERP/System;
  4. The ERP/System performs a GET Get a pre-request based on the preRequestId of the request information and performs the necessary validations;
  5. Then the ERP/System can follow 2 paths:
  1. The back-end passes this information to the service that the front-end will consume;
  2. The front-end of the ME displays the request successfully created, or shows information that the request was NOT created if there are fields with errors to be corrected;
  3. The Requester makes corrections if there are any fields with errors and resubmits the request.

📘 Note

The endpoints related to the attempt to create the request are named "Pre-request" (Pre-request) not because it is a different document, but rather as an intermediate process in the creation of the request.

Synchronous Request Steps on the Front-end

The front-end receives the information of success or error in processing a request to display to the end user.

Step-by-step on the ME front-end:

1. The requester fills in the request creation data via the screen, completing the necessary information for each item, as shown in the following screen:

Figure 4. Request Creation Attempt Screen > Item Details

2. The requester clicks Next and is informed that the request is being processed. During these seconds, integration with the ERP/System occurs.

Figure 3. Request Creation Attempt Screen

3. Next, the front-end returns the request screen indicating errors in the items or may return the screen with the request successfully published.

3.1 On the next screen, there are fields with errors, and thus, the request was not published. You can expand each item to see what these errors were and in which fields.

Figure 5. Request Not Published Due to Errors Screen.

3.2 On the next step, the request was successfully created.

Figure 6. Request Successfully Created Screen.

Drafts

All request creation attempts that failed for some reason are saved in the Drafts list. This includes requests that were not created due to fields with errors or requests that started being filled but were not yet submitted, due to connection issues, for example.

Drafts of request creations will be maintained until you finish filling them out or correcting them and resubmit. When the request is finally created, the draft will be deleted.

Figure 7. Screen with the List of Saved Drafts.