Aggregation

This topic provides an example of a JSON response for an account aggregation operation.

Using the Web Services source, you can have multiple account aggregation operations. For example, Aggregation - 1 and Aggregation - 2.

Account Aggregation - 1

You can aggregate two attributes from EndPoint1 and three more attributes from EndPoint2.

When you configure multiple operations, the response of first operation can be used as an input in the second operation.

Raw API Response for Account Aggregation - 1

The following is an example of a raw response for the given response information and response mapping.

Copy
{
    "members": [
        {
            "profile": {
                "groups": "testGroup",
                "name": {
                    "display_name": "testName1"
                },
                "team_member_id": "153",
                "email": "test153@orgName.com"
            },
            "role": {
                ".tag": "tagName1"
            }
        },
        {
            "profile": {
                "groups": "testGroup2",
                "name": {
                    "display_name": "testName2"
                },
                "team_member_id": "154",
                "email": "test154@orgName.com"
            },
            "role": {
                ".tag": "tagName2"
            }
        }
    ]
}

Account Aggregation - 2

For example, during aggregation of Dropbox, the response of the first endpoint will return the id, Username, firstName, among others.

This response must be provided as an input to the second endpoint. This can be provided with the help of a keyword "response" ($response.team_member_id$), where team_member_id is the value fetched from Account Aggregation -1 and it is an identity attribute in the source schema.

Raw API Response for Account Aggregation - 2

The following is an example of a raw response for the given response information and response mapping.

Copy
{
    "profile": {
        "email_verified": "Yes",
        "name": {
            "given_name": "Test123",
            "surname": "surnameValue"
        },
        "status": {
            ".tag": "tagValue"
        }
    }
}