# Aggregation Complete Workflow Trigger Help

**URL:** <https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, event-triggers, sailpoint-identity-security\
**Created:** [March 28, 2024, 4:41pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239 "2024-03-28T16:41:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adel0623](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Adel0623](https://developer.sailpoint.com/discuss/u/Adel0623)\
**Post date:** [March 28, 2024, 4:41pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/1 "2024-03-28T16:41:44Z")

</div>

Hello all, First time using the Account Aggregation Completed trigger and need a little help on any sample of what should go into the filter bob so that only fires off when xyz app runs and is Successful. I tried look at the even triggers but its not the right format nor is the query so i am just really stumped at this part.

I have seen all the others but for this one in documents or help. ☹

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/0/0e91dc0b8398cb9380fbd03549a1177f60d04bcf.png)

---

<div class="post-metadata">

**Author:** ![iamology](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamology/32/6964_2.png) [@iamology](https://developer.sailpoint.com/discuss/u/iamology)\
**Post date:** [March 28, 2024, 4:47pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/2 "2024-03-28T16:47:03Z")

</div>

Based on the documentation this is the json response for this trigger

```auto
{
    "source":{
        "id":"4e4d982afddff4267ab12f0f1e72b5e6d",
        "name":"Corporate Active Directory",
        "type":"SOURCE"
    },
    "status":"Success",
    "started":"2020-06-29T22:01:50.474Z",
    "completed":"2020-06-29T22:02:04.090Z",
    "errors":[

    ],
    "warnings":[
        "Account skipped"
    ],
    "stats":{
        "scanned":200,
        "unchanged":190,
        "changed":6,
        "added":4,
        "removed":3
    }
}

```

Hence, you can apply filter `$.source.id == 'SOURCE_ID' AND $.status == 'Success'` for the workflow to execute based on your conditions.

Hope this is what you were looking for

---

<div class="post-metadata">

**Author:** ![Adel0623](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Adel0623](https://developer.sailpoint.com/discuss/u/Adel0623)\
**Post date:** [March 28, 2024, 5:03pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/3 "2024-03-28T17:03:25Z")

</div>

Thanks, and i did try what you have in a different filter with the same result as i just did with your input. however, I am still getting not a valid expression. That is why I like to pull my hair out today.

I have also tried “$.Trigger.status.Success” which took but did not fire off when i ran the agg

![image](https://global.discourse-cdn.com/sailpoint/original/2X/a/a85330653e65ec5a848d46bb00a4084df17d1bee.png)

---

<div class="post-metadata">

**Author:** ![Adel0623](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Adel0623](https://developer.sailpoint.com/discuss/u/Adel0623)\
**Post date:** [March 28, 2024, 5:08pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/4 "2024-03-28T17:08:55Z")

</div>

Looks like i got it to work using the $.Trigger.status.Success in the test run. Now i have to get it to just fire off on the one application when it runs.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [March 29, 2024, 1:12pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/5 "2024-03-29T13:12:24Z")

</div>

> [@Adel0623](#):
>
> Looks like i got it to work using the $.Trigger.status.Success in the test run. Now i have to get it to just fire off on the one application when it runs.

The test workflow feature does not apply any trigger filters. No matter what you put into your trigger filter, the test workflow feature will always launch the test. The only way to test a trigger filter is to use a JSONpath editor, [as described here](https://developer.sailpoint.com/docs/extensibility/event-triggers/filtering-events#developing-filters) and fire off test events in the ETS dashboard, [as described here](https://developer.sailpoint.com/docs/extensibility/event-triggers/filtering-events#testing-filters).

As for why you are not getting a valid JSONpath expression, try this.

`$[?($.source.id == "4e4d982afddff4267ab12f0f1e72b5e6d" && $.status == "Success")]`

---

<div class="post-metadata">

**Author:** ![Adel0623](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Adel0623](https://developer.sailpoint.com/discuss/u/Adel0623)\
**Post date:** [March 29, 2024, 1:42pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/6 "2024-03-29T13:42:58Z")

</div>

Thanks Colin i will give it a try. Still trying to work on all the new things with how to use workflows from IIQ an very much appreciative.

---

<div class="post-metadata">

**Author:** ![kdfreeman](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kdfreeman/32/22737_2.png) [@kdfreeman](https://developer.sailpoint.com/discuss/u/kdfreeman)\
**Post date:** [March 29, 2024, 6:52pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/7 "2024-03-29T18:52:18Z")

</div>

Hi Andy,  
The documentation are not upto date with the sample trigger they have shown. The best way to see what JSON exactly that trigger with throw is to setup a dummy workflow in your environment with that trigger and End with success. So, there will be two block, one empty trigger and another success step. Enable that workflow and see in workflow execution , what JSON it throws in account aggregation completion.

After that you can use filter condition based upon the Json you have received which @colin_mckibben have mentioned in his answer.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [March 29, 2024, 6:58pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/8 "2024-03-29T18:58:22Z")

</div>

Hi Kapil,

Are you seeing a different payload from Account Aggregation Completed than what is documented here?

> **[Account Aggregation Completed | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/account-aggregation-completed)**
>
> Fires after an account aggregation completed, terminated, or failed.

I just tested an aggregation and I got the same schema.

---

<div class="post-metadata">

**Author:** ![kdfreeman](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kdfreeman/32/22737_2.png) [@kdfreeman](https://developer.sailpoint.com/discuss/u/kdfreeman)\
**Post date:** [March 29, 2024, 7:11pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/9 "2024-03-29T19:11:50Z")

</div>

Hi @colin_mckibben , I haven’t checked for this trigger. But for, Source Account Created trigger, I was seeing a different JSON than what it was in the documentation. Also, the source name has [source] attached at the end in the name of the source in that trigger.

So, I always create a dummy workflow to fetch JSON for the trigger that I use, and then proceed with creating filter rather than using sample JSON provided in the documentation.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [March 29, 2024, 7:14pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/10 "2024-03-29T19:14:10Z")

</div>

That’s fair enough. There is no substitute for real data when building filters. However, would you be willing to submit a bug to #Bugs for the source account created trigger? We want to make sure our samples are as accurate as possible.

---

<div class="post-metadata">

**Author:** ![kdfreeman](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kdfreeman/32/22737_2.png) [@kdfreeman](https://developer.sailpoint.com/discuss/u/kdfreeman)\
**Post date:** [March 29, 2024, 7:17pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/11 "2024-03-29T19:17:06Z")

</div>

Sure I will do that.

---

<div class="post-metadata">

**Author:** ![Adel0623](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Adel0623](https://developer.sailpoint.com/discuss/u/Adel0623)\
**Post date:** [April 1, 2024, 12:08pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/12 "2024-04-01T12:08:58Z")

</div>

Thanks everyone. Just so everyone is aware and if they have done this, please feel free to help as i think this will be a great help for others once completed and working.

Need to push Manager data from a source that is updated weekly in IDN to NERM so that the drop-down options are always up to date for Requesters.

I will give this logic a try and let everyone know as well. Cheers,

---

<div class="post-metadata">

**Author:** ![mcheek](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mcheek/32/23705_2.png) [@mcheek](https://developer.sailpoint.com/discuss/u/mcheek)\
**Post date:** [April 1, 2024, 2:56pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/13 "2024-04-01T14:56:41Z")

</div>

Yes, specifically that the “Terminated” status doesn’t seem to exist in the real world

Here are my reproduction steps that show aggregations ending in a “Warning” are showing a status of “Success” even though the documentation says it should end in “Terminated”:

> [@Account Aggregation Completed Trigger - Not firing on error, showing success on warning](https://developer.sailpoint.com/discuss/t/account-aggregation-completed-trigger-not-firing-on-error-showing-success-on-warning/24029/4):
>
> Ok, I was able to reproduce this in my sandbox in 1/2 scenarios First, here is the trigger subscription (webhook url obfuscated) { "triggerId": "idn:account-aggregation-completed", "httpConfig": { "httpDispatchMode": "SYNC", "httpAuthenticationType": "NO\_AUTH", "url": "https://webhook.site/someRandomGUID", "basicAuthConfig": null, "bearerTokenAuthConfig": null }, "triggerName": "Account Aggregation Comp…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [May 31, 2024, 2:57pm UTC](https://developer.sailpoint.com/discuss/t/aggregation-complete-workflow-trigger-help/38239/14 "2024-05-31T14:57:08Z")

</div>

Closed on May 31, 2024, 2:57pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
