Flows › DomEngine e993437a6

cron abandoned-carts done

· 41 ms · specs: Spec:shop-carts, Spec:shop-notify, Spec:shop-orders, Spec:shop-shipping, Spec:shop-stock, Spec:shop, Story:shop-flows, Story:shop-samples, Settings:Init

JSON
Resulting value (payload)
[
  "cart-1",
  "cart-3"
]
Trace
msgshop.abandonedCarts(hours=48)line 1
rulerule shop.abandonedCarts (line 22)line 22
valcut = 1791169204634line 23
msgdom.list(cls="Cart")line 24
tooldom.list -> {total: 3, class: "Cart", data: [{_id: "6ac46c585896b16142c06f0d", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-1"}, id: "cart-1", customer: "c-omar", status: "open", updated: "202…line 24
valold = [{_id: "6ac46c585896b16142c06f0d", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-1"}, id: "cart-1", customer: "c-omar", status: "open", updated: "2026-09-01", lines: [{sku: "FP-1L",…line 24
msgshop.abandon(id="cart-1")line 25
rulerule shop.abandon (line 28)line 28
msgdom.find(cls="Cart", key="cart-1")line 29
tooldom.find -> {_id: "6ac46c585896b16142c06f0d", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-1"}, id: "cart-1", customer: "c-omar", status: "open", updated: "2026-09-01", lines: [{sku: "FP-1L", …line 29
valc = {_id: "6ac46c585896b16142c06f0d", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-1"}, id: "cart-1", customer: "c-omar", status: "open", updated: "2026-09-01", lines: [{sku: "FP-1L", …line 29
msgdom.upsert(cls="Cart", entity={_id: "6ac46c585896b16142c06f0d", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-1"}, id: "cart-1", customer: "c-omar", status: "abandoned", updated: "2026-09-01", lines: [{sku: "FP-…)line 30
tooldom.upsert -> {_id: "6ac46c585896b16142c06f0d", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-1"}, id: "cart-1", customer: "c-omar", status: "abandoned", updated: "2026-09-01", lines: [{sku: "FP-…line 30
msgdom.find(cls="Customer", key="c-omar")line 31
tooldom.find -> {_id: "6ac46c585896b16142c06f05", assetRef: {inv: "col", col: "Customer", category: "Customer", key: "c-omar"}, id: "c-omar", name: "Omar Haddad", email: "omar@example.com", address: {street: "4 Rue P…line 31
valwho = {_id: "6ac46c585896b16142c06f05", assetRef: {inv: "col", col: "Customer", category: "Customer", key: "c-omar"}, id: "c-omar", name: "Omar Haddad", email: "omar@example.com", address: {street: "4 Rue P…line 31
msgshop.notify(to="omar@example.com", text="Still thinking about it, Omar Haddad? Your cart is waiting.")line 32
rulerule shop.notify (line 8)line 8
msgdom.list(cls="Message")line 9
tooldom.list -> {total: 0, class: "Message", data: []}line 9
valn = 0line 9
msgdom.upsert(cls="Message", entity={id: "m1", to: "omar@example.com", text: "Still thinking about it, Omar Haddad? Your cart is waiting.", at: "2026-10-07T03:00:04.641Z"})line 10
tooldom.upsert -> {_id: "6ac5b5b45896b16142c0760c", assetRef: {inv: "col", col: "Message", category: "Message", key: "m1"}, id: "m1", to: "omar@example.com", text: "Still thinking about it, Omar Haddad? Your cart is wa…line 10
valpayload = {_id: "6ac5b5b45896b16142c0760c", assetRef: {inv: "col", col: "Message", category: "Message", key: "m1"}, id: "m1", to: "omar@example.com", text: "Still thinking about it, Omar Haddad? Your cart is wa…line 10
valpayload = "cart-1"line 33
msgshop.abandon(id="cart-3")line 25
rulerule shop.abandon (line 28)line 28
msgdom.find(cls="Cart", key="cart-3")line 29
tooldom.find -> {_id: "6ac46c585896b16142c06f0f", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-3"}, id: "cart-3", customer: "c-tom", status: "open", updated: "2026-09-25", lines: [{sku: "SC-BLK", …line 29
valc = {_id: "6ac46c585896b16142c06f0f", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-3"}, id: "cart-3", customer: "c-tom", status: "open", updated: "2026-09-25", lines: [{sku: "SC-BLK", …line 29
msgdom.upsert(cls="Cart", entity={_id: "6ac46c585896b16142c06f0f", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-3"}, id: "cart-3", customer: "c-tom", status: "abandoned", updated: "2026-09-25", lines: [{sku: "SC-B…)line 30
tooldom.upsert -> {_id: "6ac46c585896b16142c06f0f", assetRef: {inv: "col", col: "Cart", category: "Cart", key: "cart-3"}, id: "cart-3", customer: "c-tom", status: "abandoned", updated: "2026-09-25", lines: [{sku: "SC-B…line 30
msgdom.find(cls="Customer", key="c-tom")line 31
tooldom.find -> {_id: "6ac46c585896b16142c06f09", assetRef: {inv: "col", col: "Customer", category: "Customer", key: "c-tom"}, id: "c-tom", name: "Tom Brady-Lee", email: "tom@example.com", address: {street: "55 Main …line 31
valwho = {_id: "6ac46c585896b16142c06f09", assetRef: {inv: "col", col: "Customer", category: "Customer", key: "c-tom"}, id: "c-tom", name: "Tom Brady-Lee", email: "tom@example.com", address: {street: "55 Main …line 31
msgshop.notify(to="tom@example.com", text="Still thinking about it, Tom Brady-Lee? Your cart is waiting.")line 32
rulerule shop.notify (line 8)line 8
msgdom.list(cls="Message")line 9
tooldom.list -> {total: 1, class: "Message", data: [{_id: "6ac5b5b45896b16142c0760c", assetRef: {inv: "col", col: "Message", category: "Message", key: "m1"}, id: "m1", to: "omar@example.com", text: "Still thinking ab…line 9
valn = 1line 9
msgdom.upsert(cls="Message", entity={id: "m2", to: "tom@example.com", text: "Still thinking about it, Tom Brady-Lee? Your cart is waiting.", at: "2026-10-07T03:00:04.644Z"})line 10
tooldom.upsert -> {_id: "6ac5b5b45896b16142c0760d", assetRef: {inv: "col", col: "Message", category: "Message", key: "m2"}, id: "m2", to: "tom@example.com", text: "Still thinking about it, Tom Brady-Lee? Your cart is w…line 10
valpayload = {_id: "6ac5b5b45896b16142c0760d", assetRef: {inv: "col", col: "Message", category: "Message", key: "m2"}, id: "m2", to: "tom@example.com", text: "Still thinking about it, Tom Brady-Lee? Your cart is w…line 10
valpayload = "cart-3"line 33
valpayload = ["cart-1", "cart-3"]line 25
Story syntax tree
$send shop.abandonedCarts (hours = 48)
{
  "src": "$send shop.abandonedCarts (hours = 48)",
  "k": "step",
  "stmt": {
    "k": "send",
    "msg": "shop.abandonedCarts",
    "args": [
      {
        "name": "hours",
        "e": {
          "k": "lit",
          "v": 48
        }
      }
    ]
  }
}