I have a bursting control file for writing a file to file system and email the file to two different email address. The file works fine when the email address tag has values. But when the value is null it picks the value from different element
I have 2 email deliveries. one to bill to customer with template A and second one is to ship to customer CC to bill to customer with template B. Also write both the output files to file system using delivery id (333 and 444)
The issue is, if record A has both Ship To and Bill To email it works fine. But if record B has only Ship to and no Bill To (i.e Bill to is null in the XML data), the bursting takes the Bill To address of A and sends the file. Is there a way to reset the variable in bursting control file.
bursting won't take a value from a different variable. I think there is some issue with the variable CF_BILL_TO_EMAIL. Check if you are setting a different value if the value is null before invoking the bursting file.
I checked the XML output and the record looks fine. Say for example if my XML out is having 3 records as below
Record 1: Bill_To_email : b1@ABC.COM and Ship_to_email : s1@ABC.com
REcord 2: Bill_to_email : NULL and Ship_to_email: s2@XYZ.com
Record 3: Bill_to_email: NULL and Ship_to_email: Null
Bursting has triggered emails like (2 emails with different templates for each records has to be sent one for Bill_to delivery and another one for Ship_to delivery with CC to Bill_to person)
For record one it is fine as it has both email address:
1. 1st email with TO address as b1@ABC.COM which is as per the Bill_to_email delivery id
2. 2nd email with TO Address as s1@ABC.com and CC address as b1@ABC.com as per the ship_to_email delivery id
But the issue is for second record which has only Ship_to and no bill_to email address
The mail is wrongly generated as below
1. No bill to mail generated as there is a filter condition to check if Bill_to email is not null -- which is fine and as expected
2. but Ship_to email got generated with CC of first records Bill_to email
To : S2@XYZ.com
CC : b1@ABC.com << Email address from first record though it is null in the generated XML for the second record>>
For 3 red record no emails generated
1. As for Bill_to delivery id the filter to check bill_to_email_address should not be null
2. For Ship_to email the filter to check ship_to_email_address should not be null.