Can Pega DocAI Connect be used for documents from upstream systems

Can Pega Doc AI Connect be leveraged to process document content (e.g., binary files or input streams) originating from an external upstream system, rather than documents uploaded directly by users as case attachments in Pega?

Today We currently receive documents from upstream systems through API and attach them to the Pega case but we would like to explore whether Doc AI Connect can process the document content directly from the upstream system (without requiring it to be uploaded or stored as a case attachment first), extract the relevant information, and use the extracted data to automatically populate fields in the Pega UI.

Some context, first:

  1. Pega does not recommend storing attachments inside pega database, so, storing attachments in database has been deprecated. Now attachments are simply pointers to the document in repositories. Pega recommend clients configure an out of box or custom repository for their external storage systems like fileNet, Documentum, or even Alfresco CMIS. By attaching a document to a Pega case clients are not duplicating the document or storing ‘in Pega’ in any manner.
  2. An Attachment can be created programmatically as an Embed-Attach-Page; it does not need to be necessarily uploaded manually.

DocAI Connect rule (or the GenAI Connect rule with Attachment prior to '26.1.1) expects document to be attached to a case whose data model it would populate from the document.

There are two use cases when document is to be attached programmatically:

  1. When you receive the document stream, you know which case it should be attached to. Attach it to that case and call DocAI Connect rule.

  2. When you don’t know which cas type or case the document should be attached to, you use Agent (not DocAI Connect/Document Agent) to classify the document, find out which case type this should attach to, find out if a case exists, if not create such a case and Attach the document, and then invoke the DocAI Connect rule.

    I’ll cover #2 in AI Expert Circle talk. @BrahmeshTech , let me know if you have any questions. cc: @Tim_Straatsma

Thanks for jumping in @Chetan.Chaudhari!

Really good to have your clarification on the document handling

@Tim_Straatsma @Chetan.Chaudhari Thanks for your time to respond.. Yes, we are aware that storing documents directly in Pega Database will no longer be supported in the 26 version, and we are already storing documents in an external repository.

The Doc AI Connect expects a property of type Attachment. In our scenario, the documents originate from an upstream system through API and attached to the case so are you suggesting that we create a page property with the Embed-Attach-File class and configure its data access to use a data page backed by D_pzAttachmentFieldInfo?

If so, can we use this property in the Document AI Connect rule without it being explicitly defined as an Attachment-type property?

How are you currently attaching to case? Are you attaching as as-hoc attachment?

Chetan Chaudhari
Principal Product Manager
DocAI/IDP/OCR, Attachments, Case Archival
Pegasystems, Inc.

The upstream system is aware of the Pega Case ID. When it sends an API request to Pega containing the document stream, document category, and corresponding Case ID, we use the OOTB AttachFile activity within the Service-REST processing flow to attach the document to the specified case.

For DocAI Connect rule, you need to attach the file to Attachment Field. I can share a small RAP showing that.