Skip to main content

Logic: Merge

Zuora

Logic: Merge

The Logic: Merge task is only available in the Sandbox environments for you to test.

The Logic: Merge task enables you to merge multiple upstream branches of tasks into a single subsequent branch based on the completion of all pre-merge branches. 

For workflows with branches that can be run at the same time, you can use the merge task to make them run simultaneously. When all branches are completed, the merge task is triggered and the subsequent branch is run.

Data from the upstream branches will be merged into a single payload and passed to the subsequent branch. This payload can be processed by tasks in the subsequent branch.

The maximum size of the merged payload is 5MB.

This task simplifies configuring branched processes that complete before a workflow completes. It also improves the performance by allowing upstream branches to run simultaneously.

Task settings

You can add the merge task after any event triggers, e.g., on Start, on Finish, on Success, etc. To use the merge task in a workflow:

  1. Click the + button after the workflow Run card or on any task cards.

  2. Select the event on which the merge task is triggered: In the Logic task list, select the Merge task. A merge task will then be added to the workflow.

  3. Link the other upstream branches you want to connect to the merge task.

  • The merge task is only triggered after all the upstream branches are completed. If the task in a branch fails, the merge task will not be triggered.
  • There must be at least two upstream branches connected to the merge task.
  • The merge task only allows you to merge flows, not data.

Example

This example demonstrates how to use the merge task to enable two sub-branches to run at the same time.

This workflow intends to first update both the customer accounts and invoices, then send an email to the customers. With the merge task, the workflow can be designed as below so that the customer account update and invoice update can happen simultaneously. When both are complete, the merge task will be triggered and the downstream notification task will be run.

workflow_task_merge.png

The merge task in this case helps reduce the implementation time of the workflow.