After working through this scenario multiple times, here’s the complete solution for multi-line invoice duplicate detection:
Invoice Deduplication Logic:
Workday’s AP API uses a composite key for duplicate detection that includes:
- Vendor Reference ID (internal Workday ID, not external code)
- Invoice Number
- Invoice Date
- Total Amount (sum of all line items)
- Line Item Hash (MD5 of concatenated line descriptions, GL codes, and amounts)
The line item hash is where multi-line invoices fail. If you submit an invoice with generic line descriptions (“Service Fee”, “Materials”, etc.) that match patterns in existing invoices, the API flags it as a duplicate even if the invoice number is unique.
Vendor ID Inclusion Requirements:
You must pass the vendor reference in the correct format. The API expects:
{
"vendor": {
"id": "abc123def456",
"type": "Vendor_Reference_ID"
},
"invoice_number": "INV-2025-0847"
}
Not just "vendor": "V-12345". The nested object structure with explicit type declaration is mandatory for proper duplicate detection. Without it, the API can’t reliably match vendor records and falls back to fuzzy matching, which causes false positives.
Automated AP Processing Fix:
To resolve your 200 daily invoice blockage:
-
Vendor ID Resolution: Pre-process invoices to fetch proper Workday vendor references:
- Call GET /vendors?external_id=V-12345
- Extract the Vendor_Reference_ID from response
- Cache vendor mappings to reduce API calls
-
Line Item Uniqueness: Enhance line descriptions to ensure uniqueness:
- Append invoice number: “Service Fee - INV-2025-0847”
- Include line sequence: “Materials (Line 2)”
- Add date reference: “Consulting - May 2025”
-
Deduplication Override: For legitimate duplicate scenarios (revised invoices, corrections), use the force_create parameter:
POST /accounts-payable/invoices?force_create=true
This bypasses duplicate detection but should only be used when you’ve verified the invoice is genuinely new.
- Pre-submission Validation: Before API submission, query existing invoices:
GET /accounts-payable/invoices?vendor_id={id}&invoice_number={num}&date_range=30days
If results return empty, proceed with submission. If matches found, compare line items to determine if it’s a true duplicate or false positive.
The root cause in your case is likely the vendor ID format issue combined with generic line descriptions. Multi-line invoices with standard line items (shipping, tax, materials) trigger the deduplication algorithm more aggressively because the line item hash matches patterns across multiple invoices.
Implement the vendor reference object structure first - that alone should resolve 60-70% of your false positives. Then enhance line descriptions for the remaining cases. We went from 15% rejection rate to under 1% after making these changes to our automated AP processing workflow.