Dynamically Email Different Output File Types

Is it possible to dynamically choose which type of file to email to a customer based on a value within the Address Book record?
For instance Customer A wants their files sent as PDF documents, whereas Customer B wants them sent as Excel documents and to complicate it further Customer C wants both PDF and Excel documents

My thoughts were of something like putting a field in the XML output that had the value of either 1, 2, or 3. Then in the BIP template this value could be looked at and hopefully the file output types that were not required were able to be suppressed or similar.

Can anyone tell me whether this or something similar is possible and if so give me an example?
 
I am not sure that we can do it in BIP template with the help of flags.

We have a work around for this. In BIP, we can place the output files in specific folder and from the specific folder, we can run a second report to choose the customer and send an email based on the values in address book record.

Or we can read the output from F95930 BLOB and send an output email from second report.(This we have to check and we can have some API to read Output files from BLOB).

Thanks.
 

jileto

Well Known Member
A variation of the workaround solution above. This one doesn't need to deal with the BLOBs or having to read from external folders.

Have 2 report definitions and 2 delivery email fields in the XML. Set the delivery email fields depending on whether the customer wants PDF or Excel output or both. For example, delPDFemail will contain PDF email address, delExcelEmail will contain Excel email address.

Set report definition 1 to be PDF output using delPDFemail as the data driven recipient and pair or submit it with the UBE/Version you wish to launch first.

Set report definition 2 to be Excel output using delExcelEmail as the data driven recipient and republish the output from the 1st run above using report definition 2.

You can even create a custom UBE that will do both steps above so that everything is automated. Use the republish function called from P95630 to republish the output of the 1st report definition.

Only downside is that customers who opt to receive both PDF and Excel emails will receive 2 emails, one for PDF and one for Excel output.
 
Top