Logic Apps (Standard) Data Mapper Patterns: Aggregation Pattern

Basically, the Aggregation Pattern could also be another example or a subset of the Content Enricher Pattern (you can know more about this here: BizTalk Mapping Patterns & Best Practices), but sometimes when we exchange messages between different systems, we will need to gather information from multiple external sources, this is also known as Scatter-Gather Pattern (https://www.enterpriseintegrationpatterns.com/patterns/messaging/BroadcastAggregate.html), and once a complete set of messages has been received, we need to process them as a whole and combine or merge parts of information from each correlated message to create the expected message by the target system.

So the main difference between the Aggregation Pattern and the Content Enricher one is that in this last one, we’re normally talking about mapping one-to-one messages, and in the Aggregator pattern, we are dealing with multiple inbound messages that were collected from the original request and need to be mapped and aggregated into a single outbound request. For example, we want to bill the client’s order after all items have been pulled from the financial system or warehouse. Also, Content Enricher can happen inside the Aggregation Pattern along with other types of patterns.

Reference to this pattern:

In this video, you can see and learn how to apply the Aggregation Pattern inside the new Data Mapper available for Logic Apps (Standard)

Hope you find this helpful! So, if you liked the content or found it useful and want to help me write more, you can buy (or help buy) my son a Star Wars Lego! 

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

1 thought on “Logic Apps (Standard) Data Mapper Patterns: Aggregation Pattern”

  1. Hi Sandro,

    I am facing two difficulties in Json to Json mappings,
    1.
    Source json has following payload [just cleared other elements for clarity],

    {
    “supply”: {
    “city”: null
    }
    }

    But in Target json payload, null value is reflecting as empty string,
    {
    “supply”: {
    “city”: “”
    }
    }
    How to enforce null value as is in the target ?

    2.
    How to map a function guid() or uuid() into target element?

    Thanx,
    -Swapnil

Leave a Reply

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

turbo360

Back to Top