# Aggregators

* **Opposite of splitters**
* **Combines multiple actions back down to one**
* **Useful when flow needs to wait for actions to complete before next step**

```typescript
// Effect aggregators
@Effect()
aggregator = this.actions$.pipe(
 ofType<LoadUserById>(UserActionTypes.LoadUserById),
 flatMap(a =>
   zip(
     this.actions$.pipe(
       ofType<LoadUserByIdSuccess>(UserActionTypes.LoadUserByIdSuccess),
       first(t => t.payload.id === a.payload.id)
     ),
     this.actions$.pipe(
       ofType<Logged>(LogActionTypes.Logged),
       first(t => t.payload.id === a.payload.id)
     )
   )
 ),
 map(pair => new LoadAdminUserSuccess())
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://briebug.gitbook.io/ngrx-workshop/advanced-actions/aggregators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
