Short Answer
A fully automated pipeline where uploading a document to PDFelement Document Cloud triggers an OCR extraction and creates a matched, categorized draft bill in Xero with the original file attached for audit compliance.
The Problem
Manual data entry from invoices into accounting software is prone to human error and consumes hours of administrative time. Managing paper or unsearchable PDF receipts often leads to delayed payments and disorganized financial records.
The Outcome
A fully automated pipeline where uploading a document to PDFelement Document Cloud triggers an OCR extraction and creates a matched, categorized draft bill in Xero with the original file attached for audit compliance.
Step-by-Step Guide
1. **Log in to Zapier** and click 'Create Zap'.
2. **Set up Trigger**: Search for 'Wondershare Document Cloud' (or your synced Cloud Storage like Google Drive if using the PDFelement desktop sync). Select the 'New Document' or 'Document Completed' event.
3. **Authenticate**: Connect your Wondershare account and select the specific folder used for 'Accounting' or 'Invoices'.
4. **Add Formatter Step**: Choose 'Formatter by Zapier' -> 'Text' -> 'Extract Pattern'. Use this to isolate the Invoice Number or Total Amount from the OCR text generated by PDFelement if it isn't automatically parsed into a separate field.
5. **Find/Create Contact in Xero**: Add a Xero step for 'Find Contact'. Map the 'Vendor Name' from PDFelement. Toggle the 'Create Xero Contact if it doesn’t exist yet' checkbox to automate onboarding.
6. **Create Draft Bill in Xero**: Add the 'Create Purchase Bill' action.
- Map 'Contact' to the ID from Step 5.
- Map 'Date' to the extracted document date.
- Map 'Line Amount' to the Total Amount extracted by PDFelement OCR.
- Set 'Status' to 'Draft' to allow for final human review.
7. **Prevent Duplicates**: In the 'Invoice Number' field of the Xero action, map the unique Document ID or Invoice Number from PDFelement. Xero will throw an error if you try to create a duplicate reference, which you can handle via Zapier's 'Path' or 'Filter'.
8. **Attach Source File**: Add one last step 'Xero: Upload File'. Map the 'File URL' from PDFelement to the 'Purchase Bill' created in Step 6 to ensure the audit trail is complete.
9. **Test & Publish**: Run a test using a sample invoice uploaded to PDFelement. Check the 'Task History' in Zapier to ensure data flowed correctly.
Data Mapping
| PDFelement Source Field | Xero Destination Field | Logic / Transformation |
| :--- | :--- | :--- |
| **OCR Extracted Vendor** | Contact Name | Use 'Find or Create' contact logic |
| **Wondershare File URL** | File Attachment | Must be a direct download link |
| **OCR Extract: Total** | Unit Amount | `Formatter: Numbers` to ensure 2 decimal places |
| **OCR Extract: Date** | Date | `Formatter: Date/Time` to `YYYY-MM-DD` |
| **File Name / Document ID** | Reference | Used for duplicate prevention |
| **AI Summary Text** | Description | Map to Line Item description |
Gotchas & Failure Modes
• **Rate Limits:** Xero's API limits you to 60 calls per minute; if uploading 100+ invoices at once, add a 'Delay by Zapier' step (1-2 minutes) to avoid 429 errors.
• **Currency Formatting:** Xero requires specific 3-letter currency codes (USD, GBP). If PDFelement extracts '