Introduction
In this test drive, you will explore how CloudFiles Document AI, integrated with Salesforce Flows, can automatically process merged or misorganized PDF documents and intelligently split them into individual files using provided instructions.
The setup enables:
- Splitting a PDF (whether merged or multi-part) based on custom or default instructions.
- Auto-naming the resulting files based on their contents.
- Creating child Result Document records linked to each individual split file.
All of this is fully automated using CloudFiles Document AI and Salesforce Flow. The test drive takes under a minute to complete.
Instructions
Follow the steps below to test the setup:
- Go to the Split or Merge Documents tab and create a new record. No additional input is required — just save it.
- Click 'Split File using AI' button on the record, this launches a screen flow.

- In the screen flow, upload the PDF file you want to split.
- If desired, input any specific instructions to guide the AI (e.g., "Split by individual Invoices" or "Separate each contract section").
- Wait a few seconds for automation to trigger. Refresh the page to see the updates.
- Review the AI Output:
- Cloudfiles AI will split the uploaded document into multiple child files and respective "Result Documents" records are created.

- Each child file is intelligently named based on its contents and the resultant child file can be found attached to the record.

Implementation
This demo is powered by Salesforce Flows with the Split Document using AI flow action. CloudFiles Document AI handles splitting and auto-naming of files based on content.
CloudFiles Document AI:
- Processes the uploaded PDF.
- Detects content-based boundaries.
- Splits the file accordingly.
- Auto-generates meaningful filenames.
The flow automatically creates child Result Document records, each holding a split file.
For more details, refer to Splitting multiple combined POs into child objects
Beyond This Test Drive
This test drive shows a basic example—but the Split Document using AI action can be leveraged in various advanced Salesforce automations:
Screen Flows for Business Users
Let agents or partners upload documents and supply optional split instructions on-screen.
Example: A partner uploads a contract bundle. AI splits it by section and names each split contract with the client name.
Record-Triggered Automations
Trigger splitting automatically when a file is uploaded or when a record meets certain criteria.
Example: A case record receives a complaint file with multiple documents. It is auto-split and stored under the appropriate child records.
Email-to-Record Processing
Combine with email ingestion to split documents attached in emails automatically.
Example: A vendor emails a combined invoice PDF. Upon ingestion, it is split into separate invoices and linked to the appropriate PO records.
Community or Partner Portal Uploads
Allow external users to upload large files that are split and processed behind the scenes.
Example: A vendor portal allows bulk upload of certificates. Each is split and stored under relevant compliance records.
AI Metadata Extraction After Split
Post-splitting, chain another Document AI action to extract metadata from each child file.
Example: Split resumes received as a bulk file, then extract candidate name and role applied for from each and map them into Lead records.
For more advanced configurations, tutorials, and ideas, visit the Document AI Tutorials.
Let CloudFiles Document AI + Salesforce work together to make your document processing workflows intelligent, fast, and scalable.