We’ve been running a workflow to send emails with PDF attachments to our customers for years now – currently on version 2024.2.3.
A few days ago, a customer reached out to us showing a PDF document that displayed his name on the document and had his customer number in the filename, but contained another customer’s number and other details printed on the document that didn’t belong to him. We’ve never had anything like this reported before.
To clarify the situation:
Customer C1 was supposed to receive this email
The source data file (XML) for C1 is correct and contains the right information
When I reprocess the same XML file now, everything comes out correctly
The wrong details in the document belong to a different customer (C2)
C2’s data is in a completely different XML file that wasn’t even processed at the same time
However, there were test runs with C2’s file earlier that same day
I can’t wrap my head around any scenario where I end up with a PDF that has C1’s name in it but C2’s customer number and other details, especially when they’re not even in the same source file. Even if they were in the same file, I still don’t see how this data mix could happen.
Any ideas or any other information that might help?
I considered opening a support ticket, but since I have no way to recreate the event, I don’t see any purpose in that.
I’m sorry to hear about this. Can you clarify how the PDFs are attached? Are these external files or the PDFs created at the same time and from the sample template (basically attaching the print context as PDF). Does this rely on metadata in Workflow?
Hi Erik, good point. Let me summarize the workflow so it’s clear what we’re doing:
Workflow steps:
I receive the XML file containing all customer data needed to create the PDFs and emails from a folder
Branch:
Execute Data Mapping - output type: Metadata
From the metadata, determine if there are any PDF attachments to create
If so: Create Print Content → Create Job → Create Output and temporarily save the resulting PDF in %t
Execute Data Mapping - Metadata - IDs only
Create Email Content - using %t as a parameter to add the needed PDF attachments (matched by customer number)
The workflow and email appear to be fine. The PDF filename is correct. It’s just the content of the PDF that seems to be mixed up with data from two unrelated source files.
You mean the logic in the branch? No, I simply check my datafield “attachments” after the data mapping. Depending on the value, I either start the PDF creation or skip it. This prevents errors that would occur if I tried to create and save a PDF when the email should be sent without any attachments.
But if I’m seeing this correctly, the error is somewhere within the “Create Print Content” step, which is somehow obtaining data from elsewhere. Could there be old “metadata” from a previous workflow run interfering with the data used by “Create Print Content”? I must admit I’m not entirely sure about the scope of the metadata and whether it persists between jobs.
I think it would be best you still open a support ticket, only if to have someone check your whole process configuration and figure out if a logic error is the root cause of this.