Uploading Files To Different System Via Multi-Part REST API From An Application Built On Constellation

Hello All,

UseCase:

We have two applications built on Constellation in Pega 25.1.3 cloud.

  1. First application uses front end as a react and uses Pega workflow via DX APIs as headless.
  2. Second application uses front end as a Salesforce, and uses Pega workflow via Salesforce Process Extender for Pega marketplace component.

Both applications have a common requirement to upload files to the case as part of the process. Part of it, we have below common use cases:

  1. Manual upload of attachments to the case by user from both React front end UI or from Salesforce front end UI.
  2. Auto attachment of files from Docusign to the case after the Signers have finished signing the document.
  3. Auto generation of PDF file in Pega with fields captured in the case e.g. OWA form.
  4. Uploading the file from the listener / job scheduler.
  5. Letting the user who logs into the Pega constellation UI directly and upload a document in a case.

Pre-Requisite:

Our organization has a document management system where all applications must upload the user uploaded documents to this system, and this can be done via Multi-Part REST API only.

OOTB Behavior:

OOTB, Pega lets the document to be uploaded into Pegacloudstorage repository under attachments folder using the DX API methods from Constellation UI using this Multi-Part REST Service - application/v2 (Upload - to upload the file and record the transaction in the Data-Workattach and Link-Attach tables and then followed by Attachment method call to retrieve and show this in UI as links for user to see the uploaded attachments).

Open Questions:

  1. How can we overwrite Pega OOTB Upload Multi-Part REST Service call in Constellation and call org’s specific custom Multi-Part REST API?
  2. How can i make sure Pega doesn’t store this document interim in PegaCloudStorage repository?
  3. What design option i have, that satisfies all the above use cases mentioned ?
  4. The design should satisfy
    1. if a different front end like React application can call via DX API.
    2. Or if user uploads via Pega Constellation UI,
    3. A use case where file may auto attach to a case
  5. In all scenarios, instead of Pega storing in its PegaCloudStorage attachment folder, this file should be sent to the custom organization Multi-Part REST API should gets called, along with meta data of the case,
  6. And the respective doc id returned from the organization system should gets stored in the data-workattach table.

Note: I cannot use or create a custom repository, as here i am not invoking a custom repository, i am invoking my org’s custom Multi-Part REST API where ever a file gets attached to a case.

Please kindly assist with possible design option. Appreciate it.

I recommend building a Custom DX component to handle document uploads. This approach is reusable across both React applications and Pega Constellation, and addresses all your requirements.

The component intercepts the upload flow and routes files to your organization’s Multi-Part REST API instead of Pega’s default PegaCloudStorage. Once your system processes the file and returns a document ID, that ID gets recorded in the Data-Workattach table using Custom coding. However, you have to think about retrieving the files through REST API for the user to review it.