Comprehensive and Detailed In-Depth Explanation:
As an Appian Lead Developer, building an integration to send JSON to a customer’s API and return a code to the user involves balancing usability, performance, and reliability. The integration is triggered at form submission, and the user must see the response (case code) efficiently. The JSON includes standard fields (text, dates, numbers), and the focus is on primary considerations for the integration itself. Let’s evaluate each option based on Appian’s official documentation and best practices:
A. A process must be built to retrieve the API response afterwards so that the user experience is not impacted:This suggests making the integration asynchronous by calling it in a process model (e.g., via a Start Process smart service) and retrieving the response later, avoiding delays in the UI. While this improves user experience for slow APIs (e.g., by showing a “Processing” message), it contradicts the requirement that the user is “informed of that code at the end of the process.” Asynchronous processing would delay the code display, requiring additional steps (e.g., a follow-up task), which isn’t efficient for this use case. Appian’s default integration pattern (synchronous call in an Integration object) is suitable unless latency is a known issue, making this a secondary—not primary—consideration.
B. The request must be a multi-part POST:A multi-part POST (e.g., multipart/form-data) is used for sending mixed content, like files and text, in a single request. Here, the payload is a JSON containing case fields (text, dates, numbers)—no files are mentioned. Appian’s HTTP Connected System and Integration objects default to application/json for JSON payloads via a standard POST, which aligns with REST API norms. Forcing a multi-part POST adds unnecessary complexity and is incompatible with most APIs expecting JSON. Appian documentation confirms this isn’t required for JSON-only data, ruling it out as a primary consideration.
C. The size limit of the body needs to be carefully followed to avoid an error:This is a primary consideration. Appian’s Integration object has a payload size limit (approximately 10 MB, though exact limits depend on the environment and API), and exceeding it causes errors (e.g., 413 Payload Too Large). The JSON includes multiple case fields, and while “hundreds of thousands” isn’t specified, large datasets could approach this limit. Additionally, the customer’s API may impose its own size restrictions (common in REST APIs). Appian Lead Developer training emphasizes validating payload size during design—e.g., testing with maximum expected data—to prevent runtime failures. This ensures reliability and is critical for production success.
D. A dictionary that matches the expected request body must be manually constructed:This is also a primary consideration. The integration sends a JSON payload to the customer’s API, which expects a specific structure (e.g., { "field1": "text", "field2": "date" }). In Appian, the Integration object requires a dictionary (key-value pairs) to construct the JSON body, manually built to match the API’s schema. Mismatches (e.g., wrong field names, types) cause errors (e.g., 400 Bad Request) or silent failures. Appian’s documentation stresses defining the request body accurately—e.g., mapping form data to a CDT or dictionary—ensuring the API accepts the payload and returns the case code correctly. This is foundational to the integration’s functionality.
Conclusion: The two primary considerations are C (size limit of the body) and D (constructing a matching dictionary). These ensure the integration works reliably (C) and meets the API’s expectations (D), directly enabling the user to receive the case code at submission end. Size limits prevent technical failures, while the dictionary ensures data integrity—both are critical for a synchronous JSON POST in Appian. Option A could be relevant for performance but isn’t primary given the requirement, and B is irrelevant to the scenario.
[References: , Appian Documentation: "Integration Object" (Request Body Configuration and Size Limits). , Appian Lead Developer Certification: Integration Module (Building REST API Integrations). , Appian Best Practices: "Designing Reliable Integrations" (Payload Validation and Error Handling)., , , ]