Adobe Campaign, Marketing Automation

Sub-Workflow Activity: Best Practices

Adobe Campaign Classic Sub-workflow activity

The Sub-workflow activity in Adobe Campaign Classic is a very powerful tool that allows you to incorporate and execute reusable workflows within your main workflow. It enables you to modularize and streamline your workflow design by breaking down complex processes into smaller, manageable components.

With the Sub-workflow activity, you can create separate workflows that handle specific tasks or actions and then include them as sub-workflows within your main campaign workflow. This promotes reusability, as you can use the same sub-workflow in multiple campaign workflows, saving time and effort in workflow creation and maintenance.

Key features and benefits of the Subworkflow activity in Adobe Campaign include:

  1. Workflow Modularity: Sub-workflows act as independent modules, focusing on specific actions or processes. This improves workflow organization and readability, making it easier to understand and maintain complex campaign workflows.
  2. Reusability: You can reuse sub-workflows in multiple campaign workflows, avoiding duplication of effort. This promotes consistency and reduces the need to recreate similar workflows from scratch.
  3. Workflow Composition: By integrating sub-workflows, you can create sophisticated and flexible campaign workflows by combining multiple reusable components. This allows for a modular approach to workflow design, enhancing overall workflow efficiency.
  4. Granular Control: Sub-workflows can be customized and configured with specific settings, parameters, and input/output variables. This provides granular control over each sub-workflow’s behavior and enables seamless integration with the main campaign workflow.
  5. Improved Collaboration: Sub-workflows facilitate collaboration among campaign managers and workflow designers by enabling them to work on specific components independently. Changes made to a sub-workflow are automatically reflected in all campaign workflows that include it.
  6. Improved Readability: The workflow can accommodate only a certain number of activities, as we are all limited by the same canvas size. Surely, you have encountered a workflow that contains numerous jump points, requiring you to scroll left and down to navigate. In such cases, we can utilize the Sub-workflow activity to encapsulate specific blocks of activities. This approach transforms the block into a black box-like function that performs its designated tasks without occupying excessive space on the workflow canvas. By employing this technique, we can effectively manage complex workflows while optimizing the use of available space.

How does the sub-workflow activity work

When executing a Sub-workflow activity, a new workflow is generated and initiated using the target population from the main workflow. After the sub-workflow successfully completes its execution, the temporary workflow created for it will be automatically removed, ensuring a clean workflow environment.

In the event of a sub-workflow failure, the details and logs of the failed sub-workflow will be available for further debugging. These can be accessed in the designated execution folder, allowing you to identify and address any issues. Once the necessary fixes or adjustments are made, you can proceed by pressing “play” or restarting the main workflow.

It’s important to note that any modifications or tweaks made during the execution of the sub-workflow are only applicable to the temporary workflow and do not impact the original template. If changes are required, they should be applied to the template itself. This ensures that the sub-workflow retains its intended structure and behavior, as modifications made within the temporary workflow will be discarded once it is removed.

How to set sub-workflow activity

To be able to use Sub-workflow activity we will need to create workflow template that will be used in the Sub-workflow activity of the main workflow.

  1. Build a technical workflow and execute it, making adjustments as needed until you are satisfied with its performance and results.
  2. Duplicate the workflow and save it as a template, leaving the default settings intact during the template creation process. You can change the execution folder if you wish to be aligned with the type of subworkflow you build e.g. if it is campaign worklfow use Campaign workflows and if it is technical worklfow then use Targeting workflows folder.
  1. Integrate a “Jump (end point)” and a “Jump (Start point)” activity into the workflow, ensuring that the jump number of the end point is lower than that of the start point.
  2. Save the modified template.
  3. Create a new workflow and add a Sub-workflow activity. Choose the previously saved workflow template as the sub-workflow.
  4. Execute the main workflow to initiate the process.

Example sub-workflow activity

In our example, we will develop a waterfall diagram feature that allows us to visualize the anticipated drop in recipient target before actually executing the campaign workflow and applying typology rules to the actuall delivery. We intentionally do not exclude the target population in order to observe the corresponding drop in the delivery logs for subsequent data analysis.

To achieve this, we utilize a Fork activity at the beginning of the workflow to make the incoming target population available as an output of the sub-workflow. This ensures that the target population remains intact and accessible for further processing.

For actual waterfall we have implemented a Split activity to accommodate any filtering rules specified in the typology rules or on the delivery template. This includes actions such as deduplication, quarantine, and opt-out, which may impact the distribution of recipients within the workflow. Not demonstrated in our specific example, we can extend the functionality by reconciling our target population with the nms:address table. This reconciliation allows us to identify and account for recipients who have been quarantined.

You can notice that we are using JavaScript activity after every split subset or fork transition, this is to capture counts in each and send it back to the main workflow. I capture population count to vars. instead to instance variables (you can also use instance.vars but in my case I went and used vars. only. You can read more about variables in Adobe Campaign Classic them in my blog post)

vars.optOut = vars.recCount;
  1. Jump (end point): jump number has to be lower than the Jump (start point)
  2. Jump (start potint): has to be greater then Jump (end point)
  3. Workflow logic: any business logic you want to achieve with the sub-workflow
  4. AND-Join: to pass any vars. defined in the JavaScript activity and also let the incoming target to be on the output

The Sub-workflow activity can be applied in various scenarios to enhance workflow management and promote modularization and code reusability. Here are some examples where the Sub-workflow activity can be useful:

  1. Data Processing: Use sub-workflows to perform specific data processing tasks such as data cleansing, data transformation, or data enrichment. These sub-workflows can be reused across multiple campaigns or workflows, ensuring consistent and efficient data processing.
  2. Personalization: Implement sub-workflows to handle personalized content generation or dynamic content insertion. Sub-workflows can fetch personalized data, apply rules for content personalization, and generate customized content for each recipient.
  3. Decision Making: Create sub-workflows to handle decision-making processes within larger workflows. These sub-workflows can evaluate conditions, perform calculations, or make complex decisions based on input data, simplifying the main workflow and improving its readability.
  4. Notification Systems: Develop sub-workflows that handle notifications or alerts within a larger workflow. These sub-workflows can trigger notifications based on specific events or conditions, such as sending email notifications to administrators or updating a notification log.
  5. API Integration: Utilize sub-workflows to integrate with external APIs or systems. These sub-workflows can handle the interaction with the external services, retrieve data, perform necessary transformations, and pass the results back to the main workflow for further processing.
  6. Error Handling: Implement sub-workflows to handle error or exception scenarios. These sub-workflows can catch and handle errors, perform error logging, send notifications, or initiate recovery actions to ensure the overall workflow execution remains stable and resilient.
  7. Workflow Orchestration: Use sub-workflows to orchestrate complex workflows by breaking them down into smaller, manageable components. Each sub-workflow can handle a specific task or step, and the main workflow coordinates the execution and sequencing of these sub-workflows.

Do you have any other implementation examples or use cases? Let me know in the comments.

Oh hi there 👋
I have a FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

We don’t spam! Read our privacy policy for more info.

#Activity deepdive
Marcel Szimonisz
Marcel Szimonisz
MarTech consultant As a marketing automation consultant, I specialize in solving problems, automating processes, and driving innovation in my clients' marketing platforms.

I hold certifications in Adobe Campaign v6 (3x certified) and Salesforce Marketing Cloud (5x certified).

Additionally, I serve as a community advisor for Adobe Campaign, offering expert insights and guidance.

In addition to my professional pursuits, I also enjoy exploring various programming languages, CMSs, and frameworks, further enhancing my technical expertise and staying at the forefront of industry advancements.
Take a look at our subscription offering in case you are looking for a Marketing Automation Consultant.

Leave a comment

Your email address will not be published. Required fields are marked *

Similar posts that you may find useful

ACC - How to JavaScript in Adobe Campaign Classic
Adobe Campaign, Marketing Automation

Master JavaScript in Adobe Campaign

7 minutes read

Adobe Campaign Classic utilizes JavaScript as the backend language for customizing various aspects of your instance, including workflows, libraries, web applications, and reports. The platform employs the Java Web Server called Tomcat for its operation. To execute JavaScript on the server, Adobe Campaign Classic utilizes a JavaScript engine called SpiderMonkey. SpiderMonkey, developed by the Mozilla […]

Continue reading
Salesforce Marketing Cloud Tips
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

Troubleshooting issues with Data Extensions

1 minute read

There are other aspects that I find rather unknown; while there is likely a rational explanation, the platform doesn’t provide straightforward answers. Here are some learnings of mine while working with data extensions: Importing in Contact Builder throws a validation error on the date field. The same file has been successfully imported via Email Studio.

Continue reading
Salesforce Marketing Cloud Tips
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

How to bulk change data extension fields

less than a minute read

As a Salesforce Marketing Cloud admin, you will learn that certain operations on data extensions are better handled via Email Studio, while others are more suited for Contact Builder. Today, I will explain when to use each method for adding or changing fields in a data extension. My preferred way to add or change fields […]

Continue reading
How to leverage queryDef in Adobe Campaign
Adobe Campaign, Marketing Automation

How to Leverage queryDef in Adobe Campaign

7 minutes read

When it comes to programatically selecting records from the database in Adobe Campaign Classic, queryDef emerges as a crucial tool. As a static SOAP method extensively employed in JavaScript, particularly within workflows or web apps, queryDef offers unparalleled capabilities. However, what many may not realize is that there are three distinct implementations of this function. […]

Continue reading
how to publish cloud page immediatelly
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

How to publish cloud page immediately

2 minutes read

You know the struggle when developing a cloud page application and trying to debug some issues or make changes. You publish the cloud page and wait and wait. Sometimes it takes ages, and other times it is right away. Why does this happen? How can we make it work immediately? Why we have to endure […]

Continue reading