Skip to content

Tutorial ​

One small domain runs through every example. Accounts place orders. Plans are sold per region. Each function takes the collections it touches and returns a runner. The runners are what you hand to a Machine.

StepWhat it maintainsEntry
A field on the same document_cohort on the account, from createdAtfrom
Copy a field across a reference_accountName on the orderstaging and $lookup
A total on the parent_lifetimeSpend on the account$groupId and $sum
A collection of pairsone entitlement per account and plan in a region$lookup with to: 'many', then $insert
Run them togetherone Machine

If you have not installed the package or started a machine yet, begin with Getting started.

Released under the package @omegup/msync