Adobe Campaign ranks as a leader among multichannel marketing hubs. Though it is a flexible and easy-to-implement system, it tends to get a bad rap for not being intuitive enough.

If you're new to Adobe Campaign, you will hit roadblocks for sure. I was that newbie once and had to tinker my way out of every problem. Even seasoned developers tend to lose time looking for options to solve seemingly simple problems. Let me share some tips and tricks that make working with Adobe Campaign a pleasure.

1. Download Files Easily Using Web Download Activity

Want to download a file from an S3 bucket to an SFTP location without all the trouble that it entails? You can do so using the Web download activity.

This could be the procedure you are now familiar with: You create an external account under Administration->Platform->External Accounts with server details and access key, and then select those accounts in workflow for file transfers.

Let's make this easier!

Scenario 1: You want to download a file from an S3 bucket whose path is unknown at the time of workflow configuration. To do this, define the path as a variable, and then use it in the URL field. You can then specify the storage directory of the downloaded file in File historization settings.

Adobe Campaign Hacks
Fig 1. Using variable in Web download activity

Scenario 2: You want to download a public file from the web using a workflow. Enter the URL of the file you want to download in the URL field after selecting the Explicit URL radio button.

Hacks to master Adobe Campaign
Fig 2. Specifying file path in web download activity

When using an S3 account path in the URL field, make sure that the Adobe Campaign IP address has access to the S3 bucket.

2. Delete Lists Automatically

In the course of campaign development, you would have created hundreds of lists in profiles and targets. For example, your daily workflow creates a new list each day. You need them only for a particular execution, but soon they start taking up space. Here’s how you can clear them without going after each manually: Add an SQL script into your workflow to set an expiry date for the list. The list will be automatically deleted on its expiry date.

Let me show you how it’s done.

I’m going to create lists within the folder called "TestList" (Fig. 3) in the Profiles and Targets section. 

Adobe Campaign Hacks - Deleting Lists Automatically
Fig 3. Sample list in Adobe Campaign

In the workflow shown below, the query activity fetches nine records from a table and adds them into a newly created list within the “TestList” folder. The name of the list is dynamically generated during each workflow execution along with the time of its creation. For example, “list1_20210830171949.”

Workflow to set list expiry in Adobe Campaign
Fig 4. The workflow to set list expiry in Adobe Campaign

The SQL script in “Set expiry” activity updates the Expires on value in NmsGroup table.

SQL script to set list expiry in Adobe Campaign
Fig 5. SQL script to set list expiry

After script execution, you can go to Profiles and Targets->Lists in Explorer and make sure you've set the date correctly in the Expires on column.

List in Profiles and Targets tab with the expiry date in Adobe Campaign
Fig 6. List in Profiles and Targets tab with the expiry date

3. Block Unnecessary Transition Triggers

When you upload “n” number of files to AWS S3 bucket with a single File transfer activity by using an asterisk(*) in the source file path, the file transfer activity triggers the next transition also “n” times. To avoid this, you can create an Advanced JavaScript code with two outgoing transitions.

In JavaScript code activity, there are only two transitions (Ok and Error), but in Advanced JavaScript code activity, we can define and control multiple transitions. The first call triggers the next activity in the workflow. Subsequent triggers can be ignored by adding a transition to the End activity. (Note: If you have only one file to transfer or if you give the exact filename in the path, this issue will not occur.)

Let’s go through this step by step.

First, initialize the parameter flag to be used for the conditional check as 1 in the configuration activity.

Workflow to limit number of executions in Adobe Campaign
Fig 7. JavaScript configuration in workflow to limit the number of executions

Next, define the File transfer activity to upload files from an SFTP location to AWS S3. I’ve chosen three files here.

Adobe Campaign: Sample files in SFTP location
Fig 8. Sample files in SFTP location
Adobe Campaign File transfer activity
Fig 9. Asterisk used in source path in File transfer activity of the workflow

The code to be used in the Advanced JavaScript code activity is shown below.

Advanced javascript code activity in Adobe Campaign
Fig 10. Advanced JavaScript code activity

If the flag value is 1, it is reset to 0, and transition “True” is triggered, or else, transition “False” is triggered. Transition “True” goes to an Alert activity to send out an email notification for successful file transfer. This Alert activity is followed by the End activity “End 1”. Transition “False” goes to “End 2” (See Fig. 11).

After the workflow is executed, all three files will be uploaded in the AWS S3 path (See Fig. 12), and “Advanced JavaScript code” will be triggered three times. However, the email notification is triggered only once as the “True” transition is triggered only once. 

Successful execution of workflow in Adobe Campaign
Fig 11. Workflow executed successfully
Files from SFTP path uploaded in AWS S3 bucket
Fig 12. Files from SFTP path uploaded in AWS S3 bucket

To know if multiple calls were ignored, you can also add logInfo(“Text”) command in the Advanced section of the End 2 activity as shown below.

Script to display log in Advanced tab of Adobe Campaign
Fig 13. Script to display log in Advanced tab of End activity

To view the output after workflow execution, right-click End 2 activity and select Display logs.

Log of End activity in Adobe Campaign
Fig 14. Log of End activity shows that two triggers were skipped

4. Add More Campaign Activities After Email Delivery

Campaign workflows usually end with a Delivery activity. But you can add another activity after a Delivery activity (for example, you need to send a success alert mail to a group of users after sending a campaign). Right-click the activity and select Open. Then check Generate an outbound transition and click OK. This will generate an outbound transition to add the next activity.

Email delivery activity in Adobe Campaign
Fig 15. Email delivery activity in Adobe Campaign
Email delivery activity in Adobe Campaign
Fig 16. Email delivery activity in Adobe Campaign

Well, it is as simple as that, though it’s hard to figure out on your own the first time!

5. Unpublish Web Applications Under Maintenance

To modify a published landing page, you have to temporarily close the application for maintenance. But there is no unpublish option in Adobe Campaign! Here’s a simple trick to circumvent the problem. 

Right-click the web application you want to unpublish and go to Actions. Select Publish. In the New status of the application drop-down menu, select Closed and click Start. The page URL will no longer be accessible online. (You can use the same method to stow away unused applications for future reference without deleting them.) Once the maintenance is complete, you can Publish the page again from the Web application dashboard.

Tip to unpublish web applications in Adobe Campaign
Fig 17. Selecting Actions for a web application
Publication wizard in Adobe Campaign
Fig 18. Publication wizard

If you try to access the URL of the closed page, it will throw up an error message. If you like to redirect to a maintenance page instead, a flag can be set for a given time frame. Then, make a transition to the maintenance page or landing page based on test conditions as shown below.

 Sample web application workflow in Adobe Campaign
Fig 19. Sample web application workflow
Adobe Campaign: Script to set duration for which the webpage is down
Fig 20. Script to set duration for which the webpage is down
Checking conditions for branching in Adobe Campaign
Fig 21. Test activity in web application to check conditions for branching

Once the above code changes are made, do remember to publish the web application again to reflect the changes.

In Closing...

It takes time and patience to master Adobe Campaign. So hang in there! If you are still struggling to get it right or not getting the desired results from your Adobe Campaign implementation, you can reach out to our team for help