{
  "contents": {
    "startTask": "44",
    "tasks": {
      "29": {
        "action": "logged-in",
        "id": "29",
        "name": "End",
        "next": {},
        "type": "automated",
        "view": {
          "x": 2688,
          "y": 228
        }
      },
      "44": {
        "allInputKeys": [
          "tenantName",
          "email"
        ],
        "calculatedInputKeys": true,
        "clientScripts": [],
        "componentsConnectors": {},
        "dynamicSelects": {},
        "htmlTemplate": {
          "1sMmkeVxVT": {
            "custom": {},
            "displayName": "Error Message",
            "hidden": false,
            "isCanvas": false,
            "linkedNodes": {},
            "nodes": [],
            "parent": "ROOT",
            "props": {
              "align": "center",
              "data-type": "error-message",
              "full-width": false,
              "hide-when-empty": true,
              "id": "1sMmkeVxVT",
              "italic": false,
              "link-target-blank": true,
              "mode": "error",
              "text-align": "center",
              "variant": "body1"
            },
            "type": {
              "resolvedName": "ErrorMessage"
            }
          },
          "LmrSIGOWZb": {
            "custom": {},
            "displayName": "Text",
            "hidden": false,
            "isCanvas": false,
            "linkedNodes": {},
            "nodes": [],
            "parent": "ROOT",
            "props": {
              "align": "center",
              "children": "Welcome!\n\n",
              "data-errormessage-value-missing": "Please fill out this field.",
              "full-width": false,
              "id": "LmrSIGOWZb",
              "isEnriched": true,
              "italic": false,
              "link-target-blank": true,
              "mode": "primary",
              "text-align": "center",
              "variant": "h2"
            },
            "type": {
              "resolvedName": "Text"
            }
          },
          "Ppb_65tyyn": {
            "custom": {
              "type": "button"
            },
            "displayName": "Button",
            "hidden": false,
            "isCanvas": false,
            "linkedNodes": {},
            "nodes": [],
            "parent": "WXF1NA21lw",
            "props": {
              "auto-submit": true,
              "children": "Continue",
              "color": "primary",
              "data-type": "button",
              "formNoValidate": false,
              "full-width": false,
              "id": "Ppb_65tyyn",
              "shape": "",
              "size": "md",
              "variant": "contained"
            },
            "type": {
              "resolvedName": "Button"
            }
          },
          "ROOT": {
            "custom": {},
            "displayName": "Container",
            "hidden": false,
            "isCanvas": true,
            "linkedNodes": {},
            "nodes": [
              "LmrSIGOWZb",
              "lJFvOdkopo",
              "yX8vTIKaPd",
              "WXF1NA21lw",
              "1sMmkeVxVT"
            ],
            "props": {
              "align": "center",
              "background": "",
              "data-editor-type": "container",
              "direction": "column",
              "id": "ROOT",
              "justify": "center",
              "paddingX": "4",
              "paddingY": "8",
              "space-between": "md",
              "spaceBetween": "4",
              "st-items-grow": 0,
              "width": "100%"
            },
            "type": {
              "resolvedName": "Container"
            }
          },
          "WXF1NA21lw": {
            "custom": {},
            "displayName": "Container",
            "hidden": false,
            "isCanvas": true,
            "linkedNodes": {},
            "nodes": [
              "Ppb_65tyyn"
            ],
            "parent": "ROOT",
            "props": {
              "align": "start",
              "background": "#ffffff00",
              "data-editor-type": "container",
              "direction": "row",
              "id": "WXF1NA21lw",
              "justify": "center",
              "paddingX": "4",
              "paddingY": "4",
              "spaceBetween": "4",
              "st-items-grow": 0,
              "width": "100%"
            },
            "type": {
              "resolvedName": "Container"
            }
          },
          "lJFvOdkopo": {
            "custom": {
              "type": "input"
            },
            "displayName": "Email Input",
            "hidden": false,
            "isCanvas": false,
            "linkedNodes": {},
            "nodes": [],
            "parent": "ROOT",
            "props": {
              "bordered": true,
              "copy-to-clipboard": false,
              "data-errormessage-pattern-mismatch": "Must be a valid email",
              "data-errormessage-value-missing": "Please fill out this field.",
              "external-input": false,
              "full-width": true,
              "id": "lJFvOdkopo",
              "label": "Email",
              "label-type": "static",
              "max": 100,
              "name": "email",
              "pattern": "^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$",
              "placeholder": "Email",
              "required": false,
              "size": "md",
              "type": "email"
            },
            "type": {
              "resolvedName": "EmailInput"
            }
          },
          "yX8vTIKaPd": {
            "custom": {
              "type": "input"
            },
            "displayName": "Tenant Name",
            "hidden": false,
            "isCanvas": false,
            "linkedNodes": {},
            "nodes": [],
            "parent": "ROOT",
            "props": {
              "bordered": true,
              "copy-to-clipboard": false,
              "data-errormessage-value-missing": "Please fill out this field.",
              "full-width": true,
              "id": "yX8vTIKaPd",
              "label": "Tenant Name",
              "label-type": "static",
              "max": 100,
              "name": "tenantName",
              "placeholder": "Tenant Name",
              "required": false,
              "size": "md"
            },
            "type": {
              "resolvedName": "TenantNameInput"
            }
          }
        },
        "id": "44",
        "inputKeys": [
          "tenantName",
          "email"
        ],
        "inputsMetadata": [
          {
            "displayName": "Tenant Name",
            "key": "tenantName"
          },
          {
            "displayName": "Email Input",
            "key": "email"
          }
        ],
        "interactions": [
          {
            "id": "Ppb_65tyyn",
            "label": "Continue",
            "type": "button"
          }
        ],
        "name": "Welcome",
        "next": {
          "rules": [
            {
              "interactionId": "Ppb_65tyyn",
              "taskId": "45"
            }
          ]
        },
        "recoveryCodesData": [],
        "screenId": "SC35fqM290DXCim21rENQuzIBkEZW",
        "type": "screen",
        "view": {
          "x": 276,
          "y": 12
        }
      },
      "45": {
        "action": "scriptlet",
        "arguments": {
          "outputPath": {
            "type": "inline",
            "value": "tenant"
          },
          "overrideForm": {
            "type": "inline",
            "value": [
              {
                "key": "tenant",
                "type": "context",
                "value": "scripts.tenant.tenant"
              }
            ]
          },
          "scriptArgs": {
            "type": "inline",
            "value": [
              {
                "key": "tenant",
                "type": "context",
                "value": "form.tenantName"
              }
            ]
          },
          "scriptCode": {
            "type": "inline",
            "value": "/*\n  You can write any JavaScript code and return a value\n  that will be stored in the context for later use\n  You can use:\n    - the arguments passed to the scriptlet from above (e.g., if you pass the argument 'arg1', you can use arg1.toUpperCase())\n    - lodash using the `_` symbol (e.g., _.get(data, 'someArgument', 'my.key'))\n    - CryptoJS for cryptographic functions (e.g., CryptoJS.MD5('Message').toString()))\n\n    You can return a value that will be used in the flow to the context key specified below\n*/\nconsole.log(tenant)\nreturn {\n    tenant\n};\n"
          }
        },
        "errorHandlingV2": {
          "ScriptletFailed": {
            "errorHandlingType": "automatic"
          }
        },
        "id": "45",
        "name": "Scriptlet",
        "next": {
          "rules": [
            {
              "interactionId": "success",
              "taskId": "46"
            }
          ]
        },
        "type": "automated",
        "view": {
          "x": 756,
          "y": 36
        }
      },
      "46": {
        "action": "sign-up-or-in-otp-email",
        "arguments": {
          "extraTemplateVals": {
            "type": "inline",
            "value": ""
          },
          "providerId": {
            "type": "inline",
            "value": ""
          },
          "templateId": {
            "type": "inline",
            "value": ""
          }
        },
        "id": "46",
        "name": "Sign Up or In / OTP / Email",
        "next": {
          "rules": [
            {
              "interactionId": "success",
              "taskId": "47"
            }
          ]
        },
        "type": "automated",
        "view": {
          "x": 1236,
          "y": 72
        }
      },
      "47": {
        "allInputKeys": [
          "code"
        ],
        "calculatedInputKeys": true,
        "contextKeys": [
          "sentTo.maskedEmail"
        ],
        "id": "47",
        "name": "Verify OTP",
        "next": {
          "rules": [
            {
              "interactionId": "resend",
              "taskId": "46"
            },
            {
              "interactionId": "oneTimeCodeId",
              "taskId": "48"
            }
          ]
        },
        "screenId": "SC35fqSS5f7BB8zcYxaAbCAWq9FCu",
        "type": "screen",
        "view": {
          "x": 1728,
          "y": 72
        }
      },
      "48": {
        "action": "verify-code-otp-email",
        "id": "48",
        "name": "Verify Code / OTP / Email",
        "next": {
          "rules": [
            {
              "interactionId": "success",
              "taskId": "29"
            }
          ]
        },
        "type": "automated",
        "view": {
          "x": 2208,
          "y": 156
        }
      },
      "start": {
        "id": "start",
        "name": "start",
        "next": {
          "rules": [
            {
              "taskId": "44"
            }
          ]
        },
        "view": {
          "x": 12,
          "y": 72
        }
      }
    }
  },
  "flowId": "tenant",
  "metadata": {
    "componentsVersion": "2.2.9",
    "description": "Sign up or in with passwords - automatically detect if user exists, and prompt for sign up or sign in accordingly.",
    "name": "tenant",
    "sharedInteractions": [
      {
        "id": "29.success",
        "type": "success"
      },
      {
        "id": "47.pnOqEGpL1b",
        "label": "Choose another authentication method"
      }
    ],
    "translation": {
      "connectorId": "manual",
      "enabled": true,
      "sourceLanguage": "en",
      "targetLanguages": [
        "zh",
        "zh-tw",
        "nl",
        "en-gb",
        "fil",
        "fr-ca",
        "fr",
        "de",
        "he",
        "hi",
        "it",
        "ja",
        "ko",
        "pl",
        "pt",
        "ru",
        "es",
        "es-mx",
        "sv",
        "tl"
      ]
    }
  },
  "references": {},
  "screens": [
    {
      "contents": {
        "1sMmkeVxVT": {
          "custom": {},
          "displayName": "Error Message",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "ROOT",
          "props": {
            "align": "center",
            "data-type": "error-message",
            "full-width": false,
            "hide-when-empty": true,
            "id": "1sMmkeVxVT",
            "italic": false,
            "link-target-blank": true,
            "mode": "error",
            "text-align": "center",
            "variant": "body1"
          },
          "type": {
            "resolvedName": "ErrorMessage"
          }
        },
        "LmrSIGOWZb": {
          "custom": {},
          "displayName": "Text",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "ROOT",
          "props": {
            "align": "center",
            "children": "Welcome!\n\n",
            "data-errormessage-value-missing": "Please fill out this field.",
            "full-width": false,
            "id": "LmrSIGOWZb",
            "isEnriched": true,
            "italic": false,
            "link-target-blank": true,
            "mode": "primary",
            "text-align": "center",
            "variant": "h2"
          },
          "type": {
            "resolvedName": "Text"
          }
        },
        "Ppb_65tyyn": {
          "custom": {
            "type": "button"
          },
          "displayName": "Button",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "WXF1NA21lw",
          "props": {
            "auto-submit": true,
            "children": "Continue",
            "color": "primary",
            "data-type": "button",
            "formNoValidate": false,
            "full-width": false,
            "id": "Ppb_65tyyn",
            "shape": "",
            "size": "md",
            "variant": "contained"
          },
          "type": {
            "resolvedName": "Button"
          }
        },
        "ROOT": {
          "custom": {},
          "displayName": "Container",
          "hidden": false,
          "isCanvas": true,
          "linkedNodes": {},
          "nodes": [
            "LmrSIGOWZb",
            "lJFvOdkopo",
            "yX8vTIKaPd",
            "WXF1NA21lw",
            "1sMmkeVxVT"
          ],
          "props": {
            "align": "center",
            "background": "",
            "data-editor-type": "container",
            "direction": "column",
            "id": "ROOT",
            "justify": "center",
            "paddingX": "4",
            "paddingY": "8",
            "space-between": "md",
            "spaceBetween": "4",
            "st-items-grow": 0,
            "width": "100%"
          },
          "type": {
            "resolvedName": "Container"
          }
        },
        "WXF1NA21lw": {
          "custom": {},
          "displayName": "Container",
          "hidden": false,
          "isCanvas": true,
          "linkedNodes": {},
          "nodes": [
            "Ppb_65tyyn"
          ],
          "parent": "ROOT",
          "props": {
            "align": "start",
            "background": "#ffffff00",
            "data-editor-type": "container",
            "direction": "row",
            "id": "WXF1NA21lw",
            "justify": "center",
            "paddingX": "4",
            "paddingY": "4",
            "spaceBetween": "4",
            "st-items-grow": 0,
            "width": "100%"
          },
          "type": {
            "resolvedName": "Container"
          }
        },
        "lJFvOdkopo": {
          "custom": {
            "type": "input"
          },
          "displayName": "Email Input",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "ROOT",
          "props": {
            "bordered": true,
            "copy-to-clipboard": false,
            "data-errormessage-pattern-mismatch": "Must be a valid email",
            "data-errormessage-value-missing": "Please fill out this field.",
            "external-input": false,
            "full-width": true,
            "id": "lJFvOdkopo",
            "label": "Email",
            "label-type": "static",
            "max": 100,
            "name": "email",
            "pattern": "^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$",
            "placeholder": "Email",
            "required": false,
            "size": "md",
            "type": "email"
          },
          "type": {
            "resolvedName": "EmailInput"
          }
        },
        "yX8vTIKaPd": {
          "custom": {
            "type": "input"
          },
          "displayName": "Tenant Name",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "ROOT",
          "props": {
            "bordered": true,
            "copy-to-clipboard": false,
            "data-errormessage-value-missing": "Please fill out this field.",
            "full-width": true,
            "id": "yX8vTIKaPd",
            "label": "Tenant Name",
            "label-type": "static",
            "max": 100,
            "name": "tenantName",
            "placeholder": "Tenant Name",
            "required": false,
            "size": "md"
          },
          "type": {
            "resolvedName": "TenantNameInput"
          }
        }
      },
      "interactions": [
        {
          "id": "Ppb_65tyyn",
          "label": "Continue",
          "type": "button"
        }
      ],
      "screenId": "SC35fqM290DXCim21rENQuzIBkEZW"
    },
    {
      "contents": {
        "ROOT": {
          "custom": {},
          "displayName": "Container",
          "hidden": false,
          "isCanvas": true,
          "linkedNodes": {},
          "nodes": [
            "auED4dEJkJ",
            "eBGiu9cYSb",
            "yZNZ2ZVVu_"
          ],
          "props": {
            "align": "center",
            "background": "",
            "data-editor-type": "container",
            "direction": "column",
            "id": "ROOT",
            "justify": "center",
            "paddingX": "4",
            "paddingY": "4",
            "spaceBetween": "5",
            "width": "100%"
          },
          "type": {
            "resolvedName": "Container"
          }
        },
        "auED4dEJkJ": {
          "custom": {},
          "displayName": "Text",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "ROOT",
          "props": {
            "children": "We've sent a message containing a 6-digit code to {{sentTo.maskedEmail}}",
            "full-width": false,
            "id": "auED4dEJkJ",
            "italic": false,
            "mode": "primary",
            "text-align": "center",
            "variant": "subtitle1"
          },
          "type": {
            "resolvedName": "Text"
          }
        },
        "eBGiu9cYSb": {
          "custom": {},
          "displayName": "Text",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "ROOT",
          "props": {
            "children": "Enter Code",
            "full-width": false,
            "id": "eBGiu9cYSb",
            "italic": false,
            "mode": "primary",
            "text-align": "center",
            "variant": "subtitle2"
          },
          "type": {
            "resolvedName": "Text"
          }
        },
        "fyz-aN6hyx": {
          "custom": {},
          "displayName": "Error Message",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "thNbUTWOGY",
          "props": {
            "color": "error",
            "data-type": "error-message",
            "full-width": false,
            "hide-when-empty": true,
            "id": "fyz-aN6hyx",
            "italic": false,
            "mode": "error",
            "text-align": "center",
            "variant": "body1"
          },
          "type": {
            "resolvedName": "ErrorMessage"
          }
        },
        "oOOUcyEOVr": {
          "custom": {},
          "displayName": "Container",
          "hidden": false,
          "isCanvas": true,
          "linkedNodes": {},
          "nodes": [
            "resend",
            "pnOqEGpL1b"
          ],
          "parent": "yZNZ2ZVVu_",
          "props": {
            "align": "start",
            "background": "#ffffff00",
            "data-editor-type": "container",
            "direction": "row",
            "id": "oOOUcyEOVr",
            "justify": "center",
            "paddingX": "5",
            "paddingY": "0",
            "spaceBetween": "0",
            "width": "100%"
          },
          "type": {
            "resolvedName": "Container"
          }
        },
        "oneTimeCodeId": {
          "custom": {
            "type": "oneTimeCode"
          },
          "displayName": "One Time Code",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "yZNZ2ZVVu_",
          "props": {
            "bordered": true,
            "data-auto-submit": true,
            "data-errormessage-pattern-mismatch": "Must be a 6 digit number",
            "digits": 6,
            "full-width": false,
            "id": "oneTimeCodeId",
            "label": "",
            "name": "code",
            "required": true,
            "size": "lg",
            "type": "tel"
          },
          "type": {
            "resolvedName": "Code"
          }
        },
        "pnOqEGpL1b": {
          "custom": {
            "type": "button"
          },
          "displayName": "Button",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "oOOUcyEOVr",
          "props": {
            "children": "Choose another authentication method",
            "color": "primary",
            "data-type": "button",
            "formNoValidate": true,
            "full-width": true,
            "id": "pnOqEGpL1b",
            "mode": "primary",
            "size": "sm",
            "variant": "link"
          },
          "type": {
            "resolvedName": "Button"
          }
        },
        "resend": {
          "custom": {
            "type": "button"
          },
          "displayName": "Button",
          "hidden": false,
          "isCanvas": false,
          "linkedNodes": {},
          "nodes": [],
          "parent": "oOOUcyEOVr",
          "props": {
            "children": "Send again",
            "color": "primary",
            "data-type": "button",
            "formNoValidate": true,
            "full-width": true,
            "id": "resend",
            "mode": "primary",
            "size": "sm",
            "variant": "link"
          },
          "type": {
            "resolvedName": "Button"
          }
        },
        "thNbUTWOGY": {
          "custom": {},
          "displayName": "Container",
          "hidden": false,
          "isCanvas": true,
          "linkedNodes": {},
          "nodes": [
            "fyz-aN6hyx"
          ],
          "parent": "yZNZ2ZVVu_",
          "props": {
            "align": "start",
            "background": "#ffffff00",
            "data-editor-type": "container",
            "direction": "row",
            "id": "thNbUTWOGY",
            "justify": "center",
            "paddingX": "4",
            "paddingY": "3",
            "spaceBetween": "1",
            "width": "100%"
          },
          "type": {
            "resolvedName": "Container"
          }
        },
        "yZNZ2ZVVu_": {
          "custom": {},
          "displayName": "Container",
          "hidden": false,
          "isCanvas": true,
          "linkedNodes": {},
          "nodes": [
            "oneTimeCodeId",
            "thNbUTWOGY",
            "oOOUcyEOVr"
          ],
          "parent": "ROOT",
          "props": {
            "align": "center",
            "background": "",
            "data-editor-type": "container",
            "direction": "column",
            "id": "yZNZ2ZVVu_",
            "justify": "start",
            "paddingX": "4",
            "paddingY": "4",
            "spaceBetween": "1.5",
            "width": "100%"
          },
          "type": {
            "resolvedName": "Container"
          }
        }
      },
      "interactions": [
        {
          "id": "pnOqEGpL1b",
          "label": "Choose another authentication method"
        },
        {
          "id": "resend",
          "label": "Send again"
        },
        {
          "id": "oneTimeCodeId",
          "label": "Verify OTP code"
        }
      ],
      "screenId": "SC35fqSS5f7BB8zcYxaAbCAWq9FCu"
    }
  ]
}