Skip to content

Instantly share code, notes, and snippets.

@gurdasnijor
Last active January 4, 2021 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gurdasnijor/3ef1b10ea7a7000e894b68cc97ccfa42 to your computer and use it in GitHub Desktop.
Save gurdasnijor/3ef1b10ea7a7000e894b68cc97ccfa42 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const signupJourney = Machine(
{
"key": "cart-abandoned",
"initial": "added_sneakers",
"states": {
"added_sneakers": {
"on": {
"DIDNT_BUY_SUPREME_ENTERED": "didnt_buy_supreme"
},
"meta": {
"audience_ast": {
"children": [
{
"children": [
{
"children": [
{
"type": "event.property.string",
"value": "category"
},
{
"type": "constant.string",
"value": "Sneakers"
}
],
"type": "operator",
"value": "="
}
],
"type": "event.count",
"value": "Product Added"
},
{
"type": "constant.integer",
"value": "1"
}
],
"type": "operator",
"value": ">="
}
}
},
"didnt_buy_supreme": {
"meta": {
"audience_ast": {
"children": [
{
"children": [
{
"children": [
{
"children": [
{
"children": [
{
"type": "event.property.string",
"value": "category"
},
{
"type": "constant.string",
"value": "Sneakers"
}
],
"type": "operator",
"value": "="
},
{
"children": [
{
"type": "event.property.string",
"value": "brand"
},
{
"type": "constant.string",
"value": "Supreme"
}
],
"type": "operator",
"value": "="
}
],
"type": "operator",
"value": "and"
}
],
"type": "event.count",
"value": "Product Added"
},
{
"type": "constant.integer",
"value": "1"
}
],
"type": "operator",
"value": ">="
},
{
"children": [
{
"type": "event.count",
"value": "Checkout Started"
},
{
"type": "constant.integer",
"value": "0"
}
],
"type": "operator",
"value": "="
}
],
"type": "operator",
"value": "and"
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment