DEV Community

Cover image for How HTTP Responses Work in Dell Boomi? | Dell Boomi Interview question
realNameHidden
realNameHidden

Posted on

How HTTP Responses Work in Dell Boomi? | Dell Boomi Interview question

This is a very common Dell Boomi interview question.

Short Answer (Interview)

I use the Return Documents Shape to return custom success or error responses along with the appropriate HTTP status code.
Before the Return Documents shape, I use a Set Properties shape (or Set Dynamic Document Properties) to set the HTTP status code and any required response headers.

How HTTP Responses Work in Dell Boomi

When a REST API request comes through the Web Services Server Connector, Boomi waits until your process finishes.

At the end of the process, you return:

  • Response Body (JSON/XML)
  • HTTP Status Code
  • Response Headers

using the Return Documents shape.

Success Response (200 / 201)

Flow

Web Services Server
        │
Validate Request
        │
Database Insert
        │
Map Response
        │
Set Properties (HTTP Status = 201)
        │
Return Documents
Enter fullscreen mode Exit fullscreen mode

Response Body

{
   "customerId":101,
   "message":"Customer Created Successfully"
}
Enter fullscreen mode Exit fullscreen mode

HTTP Status

201 Created
Enter fullscreen mode Exit fullscreen mode

Error Response (400)

Suppose email is missing.

Flow

Web Services Server
        │
Decision
        │
Email Missing?
     Yes
        │
Create Error JSON
        │
Set Properties (HTTP Status = 400)
        │
Return Documents
Enter fullscreen mode Exit fullscreen mode

Response

{
   "error":"Email is mandatory"
}
Enter fullscreen mode Exit fullscreen mode

HTTP Response

400 Bad Request
Enter fullscreen mode Exit fullscreen mode

Which Shapes are Used?

Purpose Shape
Build success payload Map / Message
Build error payload Message / Map
Set HTTP Status Code Set Properties
Return response Return Documents

Common HTTP Codes

Scenario HTTP Code
Success 200
Resource Created 201
Invalid Request 400
Unauthorized 401
Forbidden 403
Record Not Found 404
Duplicate Record 409
Internal Error 500

Example End-to-End

Client sends

POST /customers
Enter fullscreen mode Exit fullscreen mode

Validation fails.

Boomi does

Decision Shape
      ↓
Message Shape
Enter fullscreen mode Exit fullscreen mode

Creates

{
   "status":"FAILED",
   "message":"Email is mandatory"
}
Enter fullscreen mode Exit fullscreen mode


Set Properties
Enter fullscreen mode Exit fullscreen mode

Sets

HTTP Status = 400
Enter fullscreen mode Exit fullscreen mode


Return Documents
Enter fullscreen mode Exit fullscreen mode

Client receives

HTTP/1.1 400 Bad Request
Enter fullscreen mode Exit fullscreen mode
{
   "status":"FAILED",
   "message":"Email is mandatory"
}
Enter fullscreen mode Exit fullscreen mode

Interview Answer

"For REST APIs in Dell Boomi, I typically use a combination of shapes. After processing the request, I build the success or error payload using a Map or Message shape. Then, I use a Set Properties shape to set the appropriate HTTP status code (such as 200, 201, 400, or 500). Finally, I use the Return Documents shape to send the response body along with the HTTP status back to the API consumer. For exception scenarios, I handle errors using a Try/Catch shape, create a standardized error response, set the corresponding status code, and return it through the Return Documents shape."

Important Note

One point to clarify: the HTTP status code is not configured directly on the Return Documents shape. The Return Documents shape simply returns the response. The actual status code is typically provided through document properties (HTTP response properties) that are set earlier in the process (often via Set Properties or by using exception handling), and the Web Services Server connector uses those properties when sending the HTTP response.

This combination—Try/Catch + Message/Map + Set Properties + Return Documents—is the standard pattern for implementing REST API responses in Dell Boomi.

Top comments (0)