This use case details how to generate a monthly out-of-the-box Tracking indicators report in PDF format and how to send it to a list of recipients.
The main implementation steps for this use case are:
To create the list of targeted recipients, follow the steps below:
For more on creating lists, refer to this section.
To create the delivery template, follow the steps below:
Browse to the Resources > Templates > Delivery templates node of the Adobe Campaign explorer and duplicate the Email delivery built-in template.
For more on creating a delivery template, refer to this section.
Enter the template parameters: label, target (the list of previously created recipients), subject and content.
Each time the workflow is executed, the Tracking indicators report is updated as explained in Step 3: Create the workflow).
To include the latest version of the report in the delivery, you need to add a Calculated attachment:
Click the Attachments link and click the arrow next to the Add button. Select Calculated attachment….
In the Type drop-down list, select the latest option: File name is computed during delivery of each message (it may then depend on the recipient profile).
The value entered in the Label field will not appear in the final delivery.
In the text zone, enter the access path and name of the file.
Select the Advanced tab and check Script the name of the file name displayed in the mails sent. In the text zone, enter the name of the attachment in the final delivery.
Create the following workflow for this use case.
It uses three activities:
To build this workflow, follow the steps below:
Browse to the Administration > Production > Technical workflows node of Campaign exploere and create a new folder to store your workflows.
Create a new workflow.
Start by adding a Scheduler type activity and configure it so that the workflow executes on the first Monday of the month.
For more on configuring the scheduler, refer to Scheduler.
Enter the following code in the edit zone:
var reportName = "indicators"; var path = "/tmp/indicators.pdf"; var exportFormat = "PDF"; var reportURL = "<PUT THE URL OF THE REPORT HERE>"; var _ctx = <ctx _context="global" _reportContext="deliveryFeedback" /> var isAdhoc = 0; xtk.report.export(reportName, _ctx, exportFormat, path, isAdhoc);
with the following variables:
var reportName: enter the internal name of the report in double quotes. In this case, the internal name of the Tracking indicator report is “deliveryFeedback”.
var path: enter the save path of the file (“tmp”), the name you want to give the file (“deliveryFeedback”) and the file extension (“.pdf”). In this case, we have used the internal name as the file name. Values need to be between double quotes and separated by the “+” character.
The file must be saved on the server. You must enter the same path and the same name as in the General tab of the edit window for the calculated attachment, as detailed here).
var exportFormat: enter the export format of the file (“PDF”).
var _ctx (context): in this case, we are using the Tracking indicators report in its global context.
Finish by adding a Delivery activity with the following options:
Save your changes and start the workflow. The message is sent to the list of recipient every first monday of the month, with the attached report.