From c6c026aade349e5883cd49fc4856b30f6f4ff7aa Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 22:44:44 +0300 Subject: [PATCH 01/69] Create system_overview.md Added a system overview page to the docs --- .../en/getting_started/system_overview.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 websites/docs/src/content/docs/en/getting_started/system_overview.md diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md new file mode 100644 index 0000000000..a5006ac2ea --- /dev/null +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -0,0 +1,107 @@ +# System Overview + + +Ballerine is a risk management platform for performing all types of risk flows and processes. To do so, Ballerine provides the risk modules needed to build custom risk flows. You can use all modules, combinations of some modules, or just one module to perform a desired risk process. + +For example: +- **Build a full KYB flow** using data collection flow, 3rd party vendors, risk rules, and the case management. +- **Build a simple KYC** using 3rd party vendors, risk rules, and the case management. +- **Build a simple digital form** using data collection flow. +- **Manually review documents** using the case management. +- Etc. + +### Example flow using Ballerine's modules + +Example workflow + + + +## Workflows +A workflow is the engine that orchestrates the different steps of a risk flow, and how they should interact with each other. +Every workflow is a definition of a flow, made out of Ballerine's different modules. +Whenever a risk flow ("Customer Onboarding" for example) starts, the workflow that is assigned to that risk flow initiates and controls which module should be in use and when. + +**Learn more about workflows** + + [Understanding workflows technology]() + + [Creating a workflow]() + + [Configuring workflow steps]() + + [Debugging a workflow]() + +## Collection Flows +Ballerine's collection flow module enables you to collect information and documents from you end users, using customizable, white-label digital forms. +All of the steps and inputs are fully customizable, to enable building different types of flows. + +**Learn more about collection flows** + +[Creating a collection flow]() + +[Configuring a collection flow]() + +[Changing the collection flow design]() + + +Collection Flow + + + + +## Rules Engine +The Rules Engine applies risk rules to assign risk scores, present risk indicators, and automate decisions within workflows. It encompasses transition rules, risk calculation, and alerting mechanisms. + +**Learn more about the rule engine** + +[Adding rules to the workflow]() + +[Adding/configuring a rule]() + +[Making a rule affect a workflow state]() + +## Case Managment +The Case Management module provides a user interface for manual decision-making processes, such as approving, rejecting, or requesting re-submission of cases. It offers customizable layouts and information presentation, allowing users to efficiently handle and review cases. + +**Learn more about case management** + +[Overview of case management]() + +[Using the case management dashboard]() + +[Customizing case management workflows]() + + +Case Management + +## Unified API + +Ballerine's unified API is integrated with third-party vendors, APIs, and data sources to enhance functionality and capabilities. + +**Learn more about the unified API** + +[Adding a 3rd Party check to a workflow]() + +## Child Workflows +Child workflows allow for the generation and activation of extra side workflows (for example: generating multiple KYC flows for the UBOs provided mid-flow, or an extra KYB process for a parent company) and enable complex, nested processes within the main workflows. + +**Learn more about child workflows** + +[Adding a child workflow to your workflow]() + +## Plugins + +Ballerine's plugins enables deep integration with your existing systems, allowing for functionalities such as triggering flows through your CRM, integrating with pre-existing vendors, and displaying their information within Ballerine's platform. + +**Learn more about plugins** + +[Adding a plugin to your workflow]() + + +## Webhooks +Webhooks in Ballerine allow for real-time communication and integration with external systems. They enable the system to send automated messages or information to other systems as events occur within Ballerine. + +**Learn more about webhooks** + +[How to use webhooks]() + From 804d2e582b2f09363f1dc9c2ddce6d763dfec771 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:12:21 +0300 Subject: [PATCH 02/69] Create workflows_technology.md Created "Create workflows_technology.md" page --- .../src/content/docs/en/learn/workflows_technology.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 websites/docs/src/content/docs/en/learn/workflows_technology.md diff --git a/websites/docs/src/content/docs/en/learn/workflows_technology.md b/websites/docs/src/content/docs/en/learn/workflows_technology.md new file mode 100644 index 0000000000..21a68a4d9e --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/workflows_technology.md @@ -0,0 +1,9 @@ +# Understanding workflows technology + +Workflows in our system are built on top of state machines, specifically using the [XState library](https://xstate.js.org/docs/). These workflows orchestrate flows within the system, both on the backend and frontend. They are designed with an integrated plugin system, customizable templates, and durable executions. + +### Why state machines? + +In our system, workflows are defined using a State Machine model, specifically statecharts, which is implemented using the [XState library](https://xstate.js.org/docs/). In the realm of state machines, a system can be in only one state at a time. From that state, certain actions or events can lead the system to transition to other states. + +Statecharts allow the definition of complex behavior using states, sub-states, and transitions between states. It's a robust way to manage and visualize the different stages of a process and the conditions that lead to state changes. From f63c87050d493def5abaab61985cd54cd46dcd5d Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:16:07 +0300 Subject: [PATCH 03/69] Create creating_a_workflow.md Created "creating_a_workflow.md" page --- websites/docs/src/content/docs/en/learn/creating_a_workflow.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 websites/docs/src/content/docs/en/learn/creating_a_workflow.md diff --git a/websites/docs/src/content/docs/en/learn/creating_a_workflow.md b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md new file mode 100644 index 0000000000..ed2b593e46 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md @@ -0,0 +1,2 @@ +# Creating a workflow + From 880e18041a2674b1a45eb28799b111921bddd17b Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:19:05 +0300 Subject: [PATCH 04/69] Create configuring_workflow_steps.md --- .../docs/src/content/docs/en/learn/configuring_workflow_steps.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md diff --git a/websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md b/websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md new file mode 100644 index 0000000000..3e67ae456f --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md @@ -0,0 +1 @@ +# Configuring workflow steps From 14a04a9b00c40ded85a3eae78b00d3e658799c64 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:20:23 +0300 Subject: [PATCH 05/69] Create creating_a_collection_flow --- .../docs/src/content/docs/en/learn/creating_a_collection_flow | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/creating_a_collection_flow diff --git a/websites/docs/src/content/docs/en/learn/creating_a_collection_flow b/websites/docs/src/content/docs/en/learn/creating_a_collection_flow new file mode 100644 index 0000000000..7d9cb44c8a --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/creating_a_collection_flow @@ -0,0 +1 @@ +# Creating a collection flow From 931b683b28d956393aab35498890921dc7a7f8fe Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:21:32 +0300 Subject: [PATCH 06/69] Create configuring_a_collection_flow.md --- .../src/content/docs/en/learn/configuring_a_collection_flow.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md diff --git a/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md new file mode 100644 index 0000000000..0e37bf6e65 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md @@ -0,0 +1 @@ +# Configuring a collection flow From b5dcec34ffb0cc029b4662ba841b8ab202f743c7 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:22:48 +0300 Subject: [PATCH 07/69] Create changing the_collection_flow_design.md --- .../content/docs/en/learn/changing the_collection_flow_design.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md diff --git a/websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md b/websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md new file mode 100644 index 0000000000..1fc60daeee --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md @@ -0,0 +1 @@ +# Changing the collection flow design From 5884af03e5b92c3f2865b7249a4e08c7d31d5869 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:24:09 +0300 Subject: [PATCH 08/69] Create adding rules_step_to_the_workflow.md --- .../content/docs/en/learn/adding rules_step_to_the_workflow.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md diff --git a/websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md b/websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md new file mode 100644 index 0000000000..bce5d24b57 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md @@ -0,0 +1 @@ +# Adding rules step to the workflow From 42bf8c54ce7b70e0e02dab9ac049fec0121b104e Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:25:16 +0300 Subject: [PATCH 09/69] Create adding_or_configuring_a_rule.md --- .../content/docs/en/learn/Adding/adding_or_configuring_a_rule.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md diff --git a/websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md b/websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md new file mode 100644 index 0000000000..0ca85c2c82 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md @@ -0,0 +1 @@ +# Adding/configuring a rule From ccba781a912a9672239b31d7d5f27b72e51daa1f Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:26:24 +0300 Subject: [PATCH 10/69] Create adding_or_configuring_a_rule.md --- .../src/content/docs/en/learn/adding_or_configuring_a_rule.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md diff --git a/websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md b/websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md new file mode 100644 index 0000000000..0ca85c2c82 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md @@ -0,0 +1 @@ +# Adding/configuring a rule From 1ad8fd399115e377e26d2bab28b791feb63b4163 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:27:37 +0300 Subject: [PATCH 11/69] Create making_a_rule_affect_a_workflow_state.md --- .../docs/en/learn/making_a_rule_affect_a_workflow_state.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md diff --git a/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md b/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md new file mode 100644 index 0000000000..a9e280b73d --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md @@ -0,0 +1 @@ +# Making a rule affect a workflow state From da1d3b5bafa33e4edfb35a8e500c43438fba87e5 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:28:05 +0300 Subject: [PATCH 12/69] Delete websites/docs/src/content/docs/en/learn/Adding directory --- .../content/docs/en/learn/Adding/adding_or_configuring_a_rule.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md diff --git a/websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md b/websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md deleted file mode 100644 index 0ca85c2c82..0000000000 --- a/websites/docs/src/content/docs/en/learn/Adding/adding_or_configuring_a_rule.md +++ /dev/null @@ -1 +0,0 @@ -# Adding/configuring a rule From 4de4bffa926677c809dc81a0d79b731b4272e1fb Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:29:17 +0300 Subject: [PATCH 13/69] Create overview_of_case_management.md --- .../src/content/docs/en/learn/overview_of_case_management.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/overview_of_case_management.md diff --git a/websites/docs/src/content/docs/en/learn/overview_of_case_management.md b/websites/docs/src/content/docs/en/learn/overview_of_case_management.md new file mode 100644 index 0000000000..7005b02e40 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/overview_of_case_management.md @@ -0,0 +1 @@ +# Overview of case management From 75b4ae0b7ea0f72c3ca1327e3ecb9e86c8401a9d Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:30:33 +0300 Subject: [PATCH 14/69] Create using_the_case_management_dashboard.md --- .../content/docs/en/learn/using_the_case_management_dashboard.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md diff --git a/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md new file mode 100644 index 0000000000..a621d60683 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md @@ -0,0 +1 @@ +# Using the case management dashboard From abb4b26a32d3344c74371ed13ef7045715fd83ec Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:31:46 +0300 Subject: [PATCH 15/69] Create customizing_case_management_workflows.md --- .../docs/en/learn/customizing_case_management_workflows.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md diff --git a/websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md b/websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md new file mode 100644 index 0000000000..5466af1cb0 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md @@ -0,0 +1 @@ +# Customizing case management workflows From 87321faee49fb3760b23cf0b7513d64bacd8a770 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:33:11 +0300 Subject: [PATCH 16/69] Create adding_a_3rd_party_check_to_a_workflow.md --- .../docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md diff --git a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md new file mode 100644 index 0000000000..bb85903963 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md @@ -0,0 +1 @@ +# Adding a 3rd Party check to a workflow From 4df649ffaf5ffc6d40e329a6e1c4f7acbf952f28 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:34:22 +0300 Subject: [PATCH 17/69] Create adding_a_child_workflow_to_your_workflow.md --- .../docs/en/learn/adding_a_child_workflow_to_your_workflow.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md diff --git a/websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md new file mode 100644 index 0000000000..76272fbc26 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md @@ -0,0 +1 @@ +# Adding a child workflow to your workflow From d3ccd7137e2a32e9d0ed6f960df098f98e23491a Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:36:05 +0300 Subject: [PATCH 18/69] Create adding_a_plugin_to_your_workflow.md --- .../content/docs/en/learn/adding_a_plugin_to_your_workflow.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md diff --git a/websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md new file mode 100644 index 0000000000..ec6236fb81 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md @@ -0,0 +1 @@ +# Adding a plugin to your workflow From 543235c4fd7ba3be566c2d58913a74e35bfe7352 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:37:05 +0300 Subject: [PATCH 19/69] Create how_to_use_webhooks.md --- websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md diff --git a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md new file mode 100644 index 0000000000..59a500dead --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md @@ -0,0 +1 @@ +# How to use webhooks From 6f51432c82f148242ade788775ab3f40cede775c Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:51:18 +0300 Subject: [PATCH 20/69] Update system_overview.md --- .../en/getting_started/system_overview.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index a5006ac2ea..c0c8b2b6cc 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -23,13 +23,12 @@ Whenever a risk flow ("Customer Onboarding" for example) starts, the workflow th **Learn more about workflows** - [Understanding workflows technology]() + [Understanding workflows technology](websites/docs/src/content/docs/en/learn/workflows_technology.md) - [Creating a workflow]() + [Creating a workflow](websites/docs/src/content/docs/en/learn/creating_a_workflow.md) - [Configuring workflow steps]() + [Configuring workflow steps](websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md) - [Debugging a workflow]() ## Collection Flows Ballerine's collection flow module enables you to collect information and documents from you end users, using customizable, white-label digital forms. @@ -37,11 +36,11 @@ All of the steps and inputs are fully customizable, to enable building different **Learn more about collection flows** -[Creating a collection flow]() +[Creating a collection flow](websites/docs/src/content/docs/en/learn/creating_a_collection_flow) -[Configuring a collection flow]() +[Configuring a collection flow](websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md) -[Changing the collection flow design]() +[Changing the collection flow design](websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md) Collection Flow @@ -54,22 +53,22 @@ The Rules Engine applies risk rules to assign risk scores, present risk indicato **Learn more about the rule engine** -[Adding rules to the workflow]() +[Adding rules step to the workflow](websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md) -[Adding/configuring a rule]() +[Adding/configuring a rule](websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md) -[Making a rule affect a workflow state]() +[Making a rule affect a workflow state](websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md) ## Case Managment The Case Management module provides a user interface for manual decision-making processes, such as approving, rejecting, or requesting re-submission of cases. It offers customizable layouts and information presentation, allowing users to efficiently handle and review cases. **Learn more about case management** -[Overview of case management]() +[Overview of case management](websites/docs/src/content/docs/en/learn/overview_of_case_management.md) -[Using the case management dashboard]() +[Using the case management dashboard](websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md) -[Customizing case management workflows]() +[Customizing case management workflows](websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md) Case Management @@ -87,7 +86,7 @@ Child workflows allow for the generation and activation of extra side workflows **Learn more about child workflows** -[Adding a child workflow to your workflow]() +[Adding a child workflow to your workflow](websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md) ## Plugins @@ -95,7 +94,7 @@ Ballerine's plugins enables deep integration with your existing systems, allowin **Learn more about plugins** -[Adding a plugin to your workflow]() +[Adding a plugin to your workflow](websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md) ## Webhooks @@ -103,5 +102,5 @@ Webhooks in Ballerine allow for real-time communication and integration with ext **Learn more about webhooks** -[How to use webhooks]() +[How to use webhooks](websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md) From 538f612b4adb273348ee20bf3d19172bb9dd7097 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:57:31 +0300 Subject: [PATCH 21/69] Update system_overview.md --- .../src/content/docs/en/getting_started/system_overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index c0c8b2b6cc..9399a6081e 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -40,7 +40,7 @@ All of the steps and inputs are fully customizable, to enable building different [Configuring a collection flow](websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md) -[Changing the collection flow design](websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md) +[Changing the collection flow design](websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md) Collection Flow @@ -53,7 +53,7 @@ The Rules Engine applies risk rules to assign risk scores, present risk indicato **Learn more about the rule engine** -[Adding rules step to the workflow](websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md) +[Adding rules step to the workflow](websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md) [Adding/configuring a rule](websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md) From 452d4335d62c48d3ef45d1fc7a48c40ce2c9efdf Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Mon, 22 Jul 2024 23:58:14 +0300 Subject: [PATCH 22/69] Rename adding rules_step_to_the_workflow.md to adding_rules_step_to_the_workflow.md --- ...ep_to_the_workflow.md => adding_rules_step_to_the_workflow.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename websites/docs/src/content/docs/en/learn/{adding rules_step_to_the_workflow.md => adding_rules_step_to_the_workflow.md} (100%) diff --git a/websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md b/websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md similarity index 100% rename from websites/docs/src/content/docs/en/learn/adding rules_step_to_the_workflow.md rename to websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md From 308fe36ff7a70b3647a2fe79552d60ddb160eb99 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:07:21 +0300 Subject: [PATCH 23/69] Rename changing the_collection_flow_design.md to changing_the_collection_flow_design.md --- ...tion_flow_design.md => changing_the_collection_flow_design.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename websites/docs/src/content/docs/en/learn/{changing the_collection_flow_design.md => changing_the_collection_flow_design.md} (100%) diff --git a/websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md b/websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md similarity index 100% rename from websites/docs/src/content/docs/en/learn/changing the_collection_flow_design.md rename to websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md From 45056d9d65293a79554a6d2d4c3293a1d41acaaa Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:12:42 +0300 Subject: [PATCH 24/69] Update how_to_use_webhooks.md --- .../docs/en/learn/how_to_use_webhooks.md | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md index 59a500dead..3efeb4d7c8 100644 --- a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md +++ b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md @@ -1 +1,125 @@ # How to use webhooks + +## Webhook Events + +Ballerine can send chosen system events through webhooks, enabling your application to be notified in real-time when specific events occur within the system. For example, when a final decision is made on a case, a webhook can be sent that includes all of the case's data (data from the collection flow, third-party providers, risk results, and manual reviewer decisions). + +### Webhook Structure + +A webhook will have the following data structure: +```json +{ + "id": "uuid", + "eventName": "workflow.context.document.completed", + "apiVersion": 1, + "timestamp": "ISO_STRING", + "assignedAt": "ISO_STRING", + "assignee": { + "id": "assigneeId", + "firstName": "firstName", + "lastName": "lastName", + "email": "email" + }, + "workflowCreatedAt": "ISO_STRING", + "workflowResolvedAt": "ISO_STRING", + "workflowDefinitionId": "uuid", + "workflowRuntimeId": "uuid", + "ballerineEntityId": "uuid", + "correlationId": "uuid", + "environment": "sandbox", // or production + "data": {} // updateContext +} +``` + + +### Properties + +- `id` + + - **Description:** Unique identifier for the webhook event. + - **Type:** `string` +- `eventName` + + - **Description:** The name of the event that triggered the webhook. + - **Type:** `string` + - **Possible Values:** + - `'workflow.context.document.completed'` - Triggered when a case is approved or rejected. + - `'workflow.context.document.updated'` - Triggered when there is an action (like a request for revisions, vendor check retrieved, etc.) made on an active case. +- `apiVersion` + + - **Description:** The version of the API used for the webhook. + - **Type:** `number` +- `timestamp` + + - **Description:** The ISO 8601 date and time when the event occurred. + - **Type:** `string` +- `assignedAt` + + - **Description:** The ISO 8601 date and time when the case was assigned. + - **Type:** `string` +- `assignee` + + - **Description:** Details of the assignee. + - **Type:** `object` + - **Properties:** + - `id` - **Type:** `string` + - `firstName` - **Type:** `string` + - `lastName` - **Type:** `string` + - `email` - **Type:** `string` +- `workflowCreatedAt` + + - **Description:** The ISO 8601 date and time when the workflow was created. + - **Type:** `string` +- `workflowResolvedAt` + + - **Description:** The ISO 8601 date and time when the workflow was resolved. + - **Type:** `string` +- `workflowDefinitionId` + + - **Description:** Unique identifier for the workflow definition. + - **Type:** `string` +- `workflowRuntimeId` + + - **Description:** Unique identifier for the workflow runtime instance. + - **Type:** `string` +- `ballerineEntityId` + + - **Description:** Unique identifier for the Ballerine entity. + - **Type:** `string` +- `correlationId` + + - **Description:** Unique identifier for correlating between entity IDs in your systems and Ballerine's system. + - **Type:** `string` +- `environment` + + - **Description:** The environment where the event occurred. + - **Type:** `string` + - **Possible Values:** `sandbox`, `production` +- `data` + + - **Description:** Additional data relevant to the event. + - **Type:** `object` + + +### Example Use Cases + +- **Notification on Case Approval/Rejection:** + + - Use the `'workflow.context.document.completed'` event to trigger notifications or update your system when a case is approved or rejected. +- **Tracking Case Updates:** + + - Use the `'workflow.context.document.updated'` event to monitor changes to active cases and take appropriate actions based on the updates (for example, when the case changes to "manual review", "revisions", "awaiting 3rd party data", and other active workflow states. + +### Handling Webhooks + +To handle incoming webhooks, your endpoint should be able to: + +- Parse the JSON payload. +- Verify the webhook source (optional but recommended for security). +- Process the event data according to your application logic. + +### Security Recommendations + +- **Verify Webhook Signatures:** Ensure that the webhook requests are coming from Ballerine by verifying the signatures included in the request headers. + +- **HTTPS:** Always use HTTPS for your webhook endpoint to ensure data security during transmission. From 3afb051a6c84463d41011a25a64dcaf206f373ac Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:23:03 +0300 Subject: [PATCH 25/69] Update and rename configuring_workflow_steps.md to configuring_a_workflow.md --- .../docs/en/learn/configuring_a_workflow.md | 17 +++++++++++++++++ .../docs/en/learn/configuring_workflow_steps.md | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 websites/docs/src/content/docs/en/learn/configuring_a_workflow.md delete mode 100644 websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md diff --git a/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md b/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md new file mode 100644 index 0000000000..08e6f58d0d --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md @@ -0,0 +1,17 @@ +# Configuring a workflow + +## Creating a New Version/Updating a Workflow + +To manage workflow definitions, you can find an interface under the [Workflow Definitions tab](https://dashboard-sb.eu.ballerine.io/) in Ballerine's dashboard. Within this section, you can view and edit existing workflows using the JSON editors. + +To modify a workflow, follow these steps: + +1. **Locate the specific workflow** and click the "Edit" button next to the "Definition" JSON. +2. You will see two important options: **"Upgrade"** and **"Update"**. + - The **"Upgrade"** button creates a copy of the current workflow definition and increments its version number, allowing you to make changes while preserving the original version. This is useful for introducing significant modifications or testing new features without affecting the existing workflow. + - The **"Update"** button allows you to make changes directly to the current version of the workflow. This option is suitable for minor adjustments or bug fixes where creating a new version is unnecessary. + +By providing these two options, Ballerine ensures flexibility in workflow management, enabling version control while allowing for quick updates when necessary. + + +Case Management diff --git a/websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md b/websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md deleted file mode 100644 index 3e67ae456f..0000000000 --- a/websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md +++ /dev/null @@ -1 +0,0 @@ -# Configuring workflow steps From 4918646a50e3cd83e5315990643739fe799d2bd2 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:23:39 +0300 Subject: [PATCH 26/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index 9399a6081e..dfdd9ee36f 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -27,7 +27,7 @@ Whenever a risk flow ("Customer Onboarding" for example) starts, the workflow th [Creating a workflow](websites/docs/src/content/docs/en/learn/creating_a_workflow.md) - [Configuring workflow steps](websites/docs/src/content/docs/en/learn/configuring_workflow_steps.md) + [Configuring a workflow](websites/docs/src/content/docs/en/learn/configuring_a_workflow.md) ## Collection Flows From 96464d86cbf6c10fc5c974290aa55d4b969aea11 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:38:18 +0300 Subject: [PATCH 27/69] Update creating_a_workflow.md --- .../src/content/docs/en/learn/creating_a_workflow.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/creating_a_workflow.md b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md index ed2b593e46..50834122e9 100644 --- a/websites/docs/src/content/docs/en/learn/creating_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md @@ -1,2 +1,13 @@ # Creating a workflow +To Create a new workflow, you can simply copy an existing workflow. + +### Copying a Workflow + +To copy a workflow, you can use the API endpoint: `"/api/v1/workflow-definition/{id}/copy"`. This endpoint accepts the ID of an existing workflow or a template and copies it. While copying, you have the option to overwrite the workflow's "name" and "displayName". + +### Usage Example + +Copying a workflow + +Copy workflow From d3821bbfe05dd50234f4ef07ed3b35ad5df7c6ff Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:03:49 +0300 Subject: [PATCH 28/69] Update and rename customizing_case_management_workflows.md to Adding_workflows_to_the_case_management_workflows.md --- ...kflows_to_the_case_management_workflows.md | 100 ++++++++++++++++++ .../customizing_case_management_workflows.md | 1 - 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management_workflows.md delete mode 100644 websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md diff --git a/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management_workflows.md b/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management_workflows.md new file mode 100644 index 0000000000..5ec00dce7f --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management_workflows.md @@ -0,0 +1,100 @@ +# Customizing case management workflows + +To customize your case management to show your various workflows, add filters. +Filters render your different workflows as case queues you can access via the case management + +### Adding Filters + +To create a new filter (essentially a queue in the case management system), you can use the API endpoint. + +```POST /api/v1/workflow-definition/{id}/copy``` + +This will return a list of existing filters, which you can use as a reference for creating new ones. + +### Create a New Filter + +To create a new filter, make a POST request to the following endpoint: + +```POST /api/v1/external/filters``` + +**Request Body:** + +You will typically need to adjust fields such as workflowDefinitionId, entity, and other relevant parameters. Below is an example request body for creating a new filter: + +``` +{ + "name": "Till Businesses Onboarding Basic Demo (US)", + "entity": "businesses", + "query": { + "where": { + "businessId": { + "not": null + }, + "workflowDefinitionId": { + "in": [ + "clyxemn21000bru85vr9f0b5f" + ] + } + }, + "select": { + "id": true, + "tags": true, + "state": true, + "status": true, + "context": true, + "assignee": { + "select": { + "id": true, + "lastName": true, + "avatarUrl": true, + "firstName": true + } + }, + "business": { + "select": { + "id": true, + "email": true, + "address": true, + "website": true, + "industry": true, + "createdAt": true, + "documents": true, + "legalForm": true, + "updatedAt": true, + "vatNumber": true, + "companyName": true, + "phoneNumber": true, + "approvalState": true, + "businessPurpose": true, + "numberOfEmployees": true, + "registrationNumber": true, + "dateOfIncorporation": true, + "shareholderStructure": true, + "countryOfIncorporation": true, + "taxIdentificationNumber": true + } + }, + "createdAt": true, + "assigneeId": true, + "workflowDefinition": { + "select": { + "id": true, + "name": true, + "config": true, + "version": true, + "definition": true, + "contextSchema": true, + "documentsSchema": true + } + }, + "childWorkflowsRuntimeData": true + } + }, + "projectId": "till_default" +} + +``` + + + +Case Management diff --git a/websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md b/websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md deleted file mode 100644 index 5466af1cb0..0000000000 --- a/websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md +++ /dev/null @@ -1 +0,0 @@ -# Customizing case management workflows From 016bb8427507a9a2ad93980559548c049cd273a1 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:04:32 +0300 Subject: [PATCH 29/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index dfdd9ee36f..a5d8dff8e1 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -68,7 +68,7 @@ The Case Management module provides a user interface for manual decision-making [Using the case management dashboard](websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md) -[Customizing case management workflows](websites/docs/src/content/docs/en/learn/customizing_case_management_workflows.md) +[Customizing case management workflows](websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md) Case Management From a8a36bcef2cc1679c6df59d2eb2a22766f8664e9 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:05:07 +0300 Subject: [PATCH 30/69] Rename Adding_workflows_to_the_case_management_workflows.md to Adding_workflows_to_the_case_management.md --- ...nt_workflows.md => Adding_workflows_to_the_case_management.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename websites/docs/src/content/docs/en/learn/{Adding_workflows_to_the_case_management_workflows.md => Adding_workflows_to_the_case_management.md} (100%) diff --git a/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management_workflows.md b/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md similarity index 100% rename from websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management_workflows.md rename to websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md From f6ac38532272918f344bdab280a0912bf8404a39 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:10:17 +0300 Subject: [PATCH 31/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index a5d8dff8e1..cce93cd763 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -29,6 +29,8 @@ Whenever a risk flow ("Customer Onboarding" for example) starts, the workflow th [Configuring a workflow](websites/docs/src/content/docs/en/learn/configuring_a_workflow.md) + [Invoking a workflow](websites/docs/src/content/docs/en/learn/invoking_a_workflow.md) + ## Collection Flows Ballerine's collection flow module enables you to collect information and documents from you end users, using customizable, white-label digital forms. From b56592d944d6ae94b6b526894c75e123ee4030dd Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:18:26 +0300 Subject: [PATCH 32/69] Create invoking_a_workflow.md --- .../docs/en/learn/invoking_a_workflow.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 websites/docs/src/content/docs/en/learn/invoking_a_workflow.md diff --git a/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md b/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md new file mode 100644 index 0000000000..bec3bb8bb3 --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md @@ -0,0 +1,87 @@ +# Invoking a Workflow +nvoking a runtime instance of a workflow definition can be done either via the API or from the Case Management application. Once a workflow is invoked, it starts running from its initial state. + +### Invoking a Workflow via API + +To invoke a workflow using the API, make a POST request to the following endpoint: + +``` +POST /api/v1/external/workflows/run +``` + +**Request Body:** + +The payload will depend on the specific workflow being invoked. Below is an example payload: + +``` +{ + "workflowId": "till_basic_kyb_demo", + "context": { + "entity": { + "type": "business", + "id": "my-enduser-id111", + "data": { + "country": "US", + "registrationNumber": "756OPOPOP08238", + "companyName": "TILL COMPANY LIMITED", + "additionalInfo": { + "mainRepresentative": { + "email": "email@ballerine.com", + "lastName": "Last", + "firstName": "First" + } + } + } + }, + "documents": [] + } +} +``` + +**Example:** + +Here’s an example of how to invoke a workflow using `curl`: + +``` +curl -X POST "" \\ + -H "Content-Type: application/json" \\ + -d '{ + "workflowId": "till_basic_kyb_demo", + "context": { + "entity": { + "type": "business", + "id": "my-enduser-id111", + "data": { + "country": "US", + "registrationNumber": "756OPOPOP08238", + "companyName": "TILL COMPANY LIMITED", + "additionalInfo": { + "mainRepresentative": { + "email": "email@ballerine.com", + "lastName": "Last", + "firstName": "First" + } + } + } + }, + "documents": [] + } + }' + +``` + +This request starts a new instance of the workflow specified by workflowId, with the provided context data. + +invoke workflow api + +### Invoking a Workflow via Case Management Application + +1. Navigate to the **Case Management** section of the application. +2. Locate the desired queue. +3. Click the **Add Case Manually** button on the bottom of the case list. This button invokes a workflow based on the current filter settings. +4. Provide any required initial data in the form that appears. +5. Submit the form to start the workflow. + +invoke workflow case management + +By using these methods, you can efficiently start new instances of workflows, ensuring that your processes begin with the necessary context and data. From 4d4faea795e9e1c3c95c79e74233c29d409a0e29 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:41:02 +0300 Subject: [PATCH 33/69] Update Adding_workflows_to_the_case_management.md --- ...Adding_workflows_to_the_case_management.md | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md b/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md index 5ec00dce7f..6b7a1bc634 100644 --- a/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md +++ b/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md @@ -98,3 +98,174 @@ You will typically need to adjust fields such as workflowDefinitionId, entity, a Case Management + +### Customizing a case’s initial attributes + +You can customize the "Create Case" form in the Case Management application by modifying the workflow definition. Follow these steps to tailor the input fields for your case creation: + +1. **Navigate to the Dashboard:** +Go to the **"Workflow Definitions"** tab in the dashboard. +2. **Inspect and Edit a Workflow:** +Select the workflow you want to customize and click on it to inspect its details. Click the "Edit" button next to the "Definition" JSON. +3. **Modify the Initial State:** +Within the workflow definition, the initial state will contain the schema for the workflow invocation form. Edit this schema to specify the fields and data required for the form. + +> ### Example Schema: +> Here is an example of a workflow definition's initial state that includes a schema for an email input field: +> +> +> The provided JSON configuration for the "Create Case" form is composed of two main parts: `uiSchema` and `dataSchema`. These components define both the user interface layout and the data structure requirements for initiating a workflow. Here's a detailed explanation of the structure: +> +> **`meta` Object** +> +> The `meta` object encapsulates the entire configuration, containing both `uiSchema` and `dataSchema`. +> +> **`inputSchema` Object** +> +> Within the `meta` object, the `inputSchema` object contains two key sub-objects: `uiSchema` and `dataSchema`. +> +> **`uiSchema`** +> +> The `uiSchema` defines how the form fields should be presented to the user. It specifies titles, labels, visibility, and the order of fields. +> +> - **Field Titles and Labels:** Customize how each field is labeled in the UI. +> - Example: `"ui:title": "Entity ID (As represented in your system)"` sets the display title for the `id` field. +> - **Field Visibility:** Control whether a field is shown or hidden. +> - Example: `"hidden": true` hides the `type` field. +> - **Field Order:** Specify the order in which fields should appear. +> - Example: `"ui:order": ["email", "firstName", "lastName"]` defines the display order of the nested fields within `mainRepresentative`. +> +> **Structure Example:** +> +```json +"uiSchema": { + "id": { + "ui:title": "Entity ID (As represented in your system)" + }, + "data": { + "ui:label": false, + "companyName": { + "ui:title": "Company Name" + }, + "companyType": { + "ui:title": "Company Type" + }, + "additionalInfo": { + "ui:label": false, + "mainRepresentative": { + "email": { + "ui:title": "Email" + }, + "lastName": { + "ui:title": "Last Name" + }, + "ui:label": false, + "ui:order": [ + "email", + "firstName", + "lastName" + ], + "firstName": { + "ui:title": "First Name" + } + } + } + }, + "type": { + "hidden": true + } +} + +``` +> +> **`dataSchema`** +> +> The `dataSchema` defines the structure of the data, including types, required fields, and nested properties. +> +> - **Data Types:** Specify the type for each field (e.g., `string`, `object`). +> - Example: `"type": "string"` defines the `id` field as a string. +> - **Required Fields:** Indicate which fields are mandatory. +> - Example: `"required": ["id", "type", "data"]` makes `id`, `type`, and `data` required fields. +> - **Nested Properties:** Define the structure of nested objects. +> - Example: `data` is an object containing further nested objects like `additionalInfo` and `mainRepresentative`. +> +> **Structure Example:** + +``` +"dataSchema": { + "type": "object", + "required": [ + "id", + "type", + "data" + ], + "properties": { + "id": { + "type": "string" + }, + "data": { + "type": "object", + "required": [ + "companyName", + "additionalInfo" + ], + "properties": { + "companyName": { + "type": "string" + }, + "companyType": { + "type": "string" + }, + "additionalInfo": { + "type": "object", + "required": [ + "mainRepresentative" + ], + "properties": { + "mainRepresentative": { + "type": "object", + "required": [ + "firstName", + "lastName", + "email" + ], + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "lastName": { + "type": "string" + }, + "firstName": { + "type": "string" + } + } + } + } + } + } + }, + "type": { + "type": "string", + "default": "business" + } + } +} + +``` + +### Putting It All Together + +The complete configuration uses `uiSchema` to define how the form fields should appear and `dataSchema` to define the underlying data structure and validation requirements. This ensures that the "Create Case" form is both user-friendly and captures all necessary information accurately. + +By customizing these schemas, you can control both the presentation and the structure of the data for workflow initiation, ensuring that your workflows have the correct context and data right from the start. + +5. **Form Rendering:** +When the "Create Case" form is rendered in the Case Management application, it will display the input fields based on this schema. The data entered in these fields will then be used as the context for the workflow. +6. **Example Use Case:** +For a workflow that starts with some form of communication to an end user, such as sending an email, ensure that the initial state schema includes an email field. This allows the workflow to gather the necessary email address at the point of invocation. + +By following these steps, you can ensure that the "Create Case" form in the Case Management application is customized to capture all the necessary information for your workflows, ensuring smooth and accurate data flow into the workflow context. + +Case Management From 992ca907d164f7c3ccf1285e7c81424a8bf79086 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:44:55 +0300 Subject: [PATCH 34/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index cce93cd763..f261950a36 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -70,7 +70,7 @@ The Case Management module provides a user interface for manual decision-making [Using the case management dashboard](websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md) -[Customizing case management workflows](websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md) +[Add and Customize Workflows in the Case Management](websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md) Case Management From a83dba8867365d1f8ff0cf898655ca45989faffb Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:45:01 +0300 Subject: [PATCH 35/69] Update and rename Adding_workflows_to_the_case_management.md to add_and_customize_workflows_in_the_case_management.md --- ... => add_and_customize_workflows_in_the_case_management.md} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename websites/docs/src/content/docs/en/learn/{Adding_workflows_to_the_case_management.md => add_and_customize_workflows_in_the_case_management.md} (98%) diff --git a/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md b/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md similarity index 98% rename from websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md rename to websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md index 6b7a1bc634..3e46129af4 100644 --- a/websites/docs/src/content/docs/en/learn/Adding_workflows_to_the_case_management.md +++ b/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md @@ -1,4 +1,6 @@ -# Customizing case management workflows +# Add and Customize Workflows in the Case Management + +## Customizing case management workflows To customize your case management to show your various workflows, add filters. Filters render your different workflows as case queues you can access via the case management From e600b153cd30ce1500b26c68ccd5350e66e5f8ce Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 01:55:24 +0300 Subject: [PATCH 36/69] Update configuring_a_collection_flow.md --- .../en/learn/configuring_a_collection_flow.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md index 0e37bf6e65..eaac59fd5e 100644 --- a/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md +++ b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md @@ -1 +1,18 @@ # Configuring a collection flow + +**Customizing Data Collection Flow Steps and Fields** + +To adjust Ballerine’s data collection flow steps and field, you can modify the UI definition associated with your workflow. This allows you to tailor the user interface to match your specific data collection needs. + +1. **Navigate to Workflow Definitions:** +Go to the **“Workflow Definitions”** tab in the dashboard. + +2. **Edit Workflow Definition:** +Select the workflow you want to customize and click the “Edit” button next to the “Definition” JSON. + +3. **Adjust UI Definition:** +Modify the uiSchema and dataSchema within the workflow definition to match your custom data collection flow. This will ensure the UI collects the necessary data according to your requirements. + +### Example of Adding MCC Components + +[![Case Management](https://uploads-ssl.webflow.com/62a3bad46800eb4715b2faf1/669ee2a6a90a0bb96a551200_docs%20vid%20thumbnail.png)](https://www.loom.com/share/7b83cf0b749b461f8b52f63625095457?sid=41c5bf93-7004-40b8-8cf1-bc60335d9209) From 0ded653a89df48ae5c553c6d52f4228cc964af10 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:08:23 +0300 Subject: [PATCH 37/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index f261950a36..fa7a895b4f 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -96,7 +96,7 @@ Ballerine's plugins enables deep integration with your existing systems, allowin **Learn more about plugins** -[Adding a plugin to your workflow](websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md) +[Using Plugins](websites/docs/src/content/docs/en/learn/plugins.mdx) ## Webhooks From 580363ac22a6e0202bc8c44412b132923f2c174b Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:09:07 +0300 Subject: [PATCH 38/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index fa7a895b4f..828f9ddba7 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -104,5 +104,5 @@ Webhooks in Ballerine allow for real-time communication and integration with ext **Learn more about webhooks** -[How to use webhooks](websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md) +[Using webhooks](websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md) From 8c7016c04f83a33efbc23809855b0d9bbaf95674 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:13:44 +0300 Subject: [PATCH 39/69] Update adding_a_3rd_party_check_to_a_workflow.md --- .../docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md index bb85903963..ada5e5eb48 100644 --- a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md @@ -1 +1,3 @@ # Adding a 3rd Party check to a workflow + +To add a 3rd party check using Ballerine's unified API, please contact Ballerine at sales@ballerine.com. From 68e32a01dd56086f09f1d5553973ed86e956338f Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:25:05 +0300 Subject: [PATCH 40/69] Update case_management_overview.md --- .../docs/en/learn/case_management_overview.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/websites/docs/src/content/docs/en/learn/case_management_overview.md b/websites/docs/src/content/docs/en/learn/case_management_overview.md index 643b7cf6f3..97f801c327 100644 --- a/websites/docs/src/content/docs/en/learn/case_management_overview.md +++ b/websites/docs/src/content/docs/en/learn/case_management_overview.md @@ -4,19 +4,11 @@ description: Case management documentation --- -#### Description +## Case Management Overview -Give your operating team Ballerine’s case management dashboard so they can approve or reject users, initiate workflows for document re-upload or escalate cases to others in the company. -- A case management dashboard to approve, reject or classify users manually. -- Create workflows operators can trigger from the interface. -- Optimize manual work by customizing the layouts and information presented. -- Use as a standalone tool or embed in your existing dashboard. +The case management dashboard is an interface designed for agents and compliance officers. This interface allows them to manually review, make decisions, and take actions on users’ cases. -
+The case managment can gather data from the various modules of Ballerine, such as the collection flows, 3rd party providers, rules, child workflows, plugins, and manual review agents decisions. -
- - - ---- +Case Management From 9e2f7158a72494c6f68ce64a22fccc00628df67e Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:27:42 +0300 Subject: [PATCH 41/69] Update using_the_case_management_dashboard.md --- .../using_the_case_management_dashboard.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md index a621d60683..e217adecd5 100644 --- a/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md +++ b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md @@ -1 +1,94 @@ # Using the case management dashboard + +## **Case management sections** + +### **Filters** + +On the left side of the screen is a sidebar featuring various Views, or as we call them, filters. + +A filter is a categorization for cases of a defined workflow. For instance, clicking on a view labeled “Onboarding” will load the cases in your onboarding workflow, to the case list. + +Ballerine can create various filters for you, segmenting your case lists based on different workflows you provide to users (e.g., “onboarding”, ”ongoing monitoring”), or even based on specific user properties (e.g., “Hong Kong Companies”, ”China Companies”). + +### **Case list** + +Adjacent to the **Filters sidebar** is the **Case List**. This list showcases cases associated with the selected view. + +Clicking on a case within this list will display the case’s details and available actions in the case preview section to the right. + +### Case + +A case encapsulates all relevant information required to decide whether to approve or reject a customer’s application. The data it can contain includes: + +- `User Provided Data`: Information directly supplied by the user during the collection process. +- `Registry Provided Data`: Enhanced data sourced from third-party providers. +- `Child Workflow Data`: This includes both user-provided and enriched data, typically concerning an entity that is in relation to the main entity (e.g. UBOs data that comes from various individuals) + +### Case actions + +Located on the top right corner of a case are the case action buttons. These facilitate the agent's ability to make a conclusive decision and settle the case. + +- `Approve` - Confirm and accept the case's validity. +- `Reject` - Decline or dismiss the case. +- `Ask for all re-uploads` - Request users to provide documents or data, that was marked throughout the case, by the agent as problematic, again for verification. + +The case action buttons can trigger a few types of actions: + +- `Webhook` - Sends a webhook to a URL of your choice, with the case's data, decision, and reasoning. +- `Email` +- `SMS` Soon +- `CRM API Call` + +### Case status + +When viewing a case, right below the case’s title, you'll find the case’s status. + +This status informs the agent about the current condition of the case, signifying whether it’s ready for manual review, has been reviewed already, or if certain processes must still occur before the case can be manually reviewed. + +Each status also provides clarity on the actions that can be performed related to that specific case. + +The case statuses and their available statuses are: + +| Case Status | Description | Available case actions | +|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------| +| Collection flow | The case is not ready for manual review as the user hasn’t completed the collection flow. | None | +| Pending process | The collection flow has been completed, but there are processes that are still taking place for the information of the case to be complete. The available information can already be reviewed, but approval can only be done once the processes conclude. | Reject
Ask for all re-uploads | +| Pending ID verification | The collection flow has been completed, but the UBOs haven’t yet gone through their KYC processes. The available information can already be reviewed, but approval can only be done once the KYC processes conclude. | Reject
Ask for all re-uploads | +| Manual review | All of the information has been collected and the case is ready to be manually reviewed. | Approve
Reject
Ask for all re-uploads | +| Revisions | An agent has initiated a request from the user or a UBO to re-upload documents or KYC information. | Reject | +| Approved | An agent has reviewed and approved the case. | None | +| Rejected | An agent has reviewed and permanently rejected the case. | None | + + +### A Case’s Block + +A block encapsulates various data properties of a certain step, topic, third-party data, and more. + +| Block type | Read/Write (can an agent edit the information) | Actions | +| --- | --- | --- | +| User provided data block | Read/Write | None | +| Registry-provided data block | Read | None | +| Enriched data block (currently not used) | Read | None | +| Document block | Read/Write | approve +Ask to re-upload | +| KYC block (AKA - Child Workflow) | Read/Write | approve +Ask to re-upload | + +### Block actions + +- `Ask to re-upload` - An agent can click the “ask to re-upload” button to: + - **mark** that one or more documents cannot be accepted the way it was sent and new documents should be provided. once the problematic documents have been marked, the agent can click the `Ask for all re-uploads` action on the top of the case, and initiate a re-upload flow. This will send an email to the user, with a link that redirects to a flow in which they can re-upload the problematic document. + - Instantly initiate a re-upload flow to UBOs whose KYC processes have been problematic. + this will send an email to the UBO, with a link to a new KYC flow. +- `approve` - An agent can click the “ask to re-upload” button to approve a document or a UBO’s KYC result, the decision will be saved on the case, regardless if there is a decision on the entire case. This way, if other agents work on the case, they can see that a certain document has already been reviewed. + +### Block status + +Block statuses are presented to inform about the current state of the block. + +Only **Document blocks** and **KYC blocks** have **block statuses**, as they are actionable. + +- `Approved` - Appears when the content of the block has been approved +- `Re-upload needed` - Appears when the agent clicks the **ask to re-upload** button. this will enable the **Ask for all re-uploads** button and will add a value to a counter on the button. +- `Pending ID Verification` - Appears when a KYC flow has been sent to a UBO, but the UBO hasn't yet gone through the flow. +- `Pending re-upload` - Appears when a re-upload flow has been initiated, both for document re-upload and KYC re-upload. From 8f7c2a04985323e6686a5ea7490f79f711d46b45 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:37:21 +0300 Subject: [PATCH 42/69] Update making_a_rule_affect_a_workflow_state.md --- .../making_a_rule_affect_a_workflow_state.md | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md b/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md index a9e280b73d..839991880e 100644 --- a/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md +++ b/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md @@ -1 +1,114 @@ # Making a rule affect a workflow state + +### Transition Rules + +When building a workflow, you can add rules on events to determine the next state. For example, you can set a rule on an MCC code to auto-approve, auto-reject, or move to manual review. Ballerine supports multiple rule engines to define these rules. Below is an example using the JSON Logic rule engine. + +### Example: JSON Logic Rule Engine + +The following example demonstrates how to set a rule that auto-rejects a workflow if the customer has an MCC code of 0742. If the condition is not met, the workflow continues as usual. + +```json +"collection_flow": { + "on": { + "COLLECTION_FLOW_FINISHED": [ + { + "cond": { + "type": "json-logic", + "options": { + "rule": { + "in": [ + { + "var": "entity.data.additionalInfo.store.mcc" + }, + [ + "0742" + ] + ] + } + } + }, + "target": "rejected" + }, + { + "target": "get_vendor_data" + } + ] + }, + "tags": [ + "collection_flow" + ] +} + +``` + +### Explanation + +1. **Event Handling (`on`)**: + - The `COLLECTION_FLOW_FINISHED` event triggers the transition rules. +2. **Condition (`cond`)**: + - **Type (`type`)**: Specifies the type of rule engine, in this case, `json-logic`. + - **Options (`options`)**: Contains the logic rule to be evaluated. + - **Rule (`rule`)**: The JSON Logic rule to be applied. + - **`in`**: Checks if the value of `entity.data.additionalInfo.store.mcc` is in the array `["0742"]`. + - **`var`**: Retrieves the value from the workflow context, in this case, the MCC code. +3. **Targets (`target`)**: + - If the condition is met (MCC code is 0742), the workflow transitions to the `rejected` state. + - If the condition is not met, the workflow transitions to the `get_vendor_data` state. +4. **Tags (`tags`)**: + - Tags can be used to categorize or organize different parts of the workflow. + +### Customizing Transition Rules + +You can customize the transition rules to fit your specific workflow requirements. By using different conditions and targets, you can create a flexible and dynamic workflow that responds to various events and data inputs. + +### Adding New Rules + +To add more rules or modify existing ones, you can follow the structure provided and adjust the conditions and targets as needed: + +``` +"collection_flow": { + "on": { + "COLLECTION_FLOW_FINISHED": [ + { + "cond": { + "type": "json-logic", + "options": { + "rule": { + "and": [ + { + "in": [ + { + "var": "entity.data.additionalInfo.store.mcc" + }, + [ + "0742" + ] + ] + }, + { + "==": [ + { + "var": "entity.data.country" + }, + "US" + ] + } + ] + } + } + }, + "target": "rejected" + }, + { + "target": "get_vendor_data" + } + ] + }, + "tags": [ + "collection_flow" + ] +} +``` + +[![Case Management](https://uploads-ssl.webflow.com/62a3bad46800eb4715b2faf1/669eeceed5f0d99c51777ae4_image%20136.png)](https://www.loom.com/share/6a1c6331309644d7ac49492e7047f2ae?sid=c1e6ec02-e734-4960-8358-5976942a7256) From 346ff1bd195825d536d315e9ab1d01b70d7f0438 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:38:33 +0300 Subject: [PATCH 43/69] Update and rename making_a_rule_affect_a_workflow_state.md to adding_rules_and_affect_workflows.md --- ...a_workflow_state.md => adding_rules_and_affect_workflows.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename websites/docs/src/content/docs/en/learn/{making_a_rule_affect_a_workflow_state.md => adding_rules_and_affect_workflows.md} (98%) diff --git a/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md b/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md similarity index 98% rename from websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md rename to websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md index 839991880e..14b7012837 100644 --- a/websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md +++ b/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md @@ -1,4 +1,4 @@ -# Making a rule affect a workflow state +# Adding rules and affect workflows ### Transition Rules From 5b51279d39b39c7e3e93aedf28aa8a60751ca184 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:39:04 +0300 Subject: [PATCH 44/69] Update system_overview.md --- .../content/docs/en/getting_started/system_overview.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index 828f9ddba7..e133d055c5 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -55,18 +55,14 @@ The Rules Engine applies risk rules to assign risk scores, present risk indicato **Learn more about the rule engine** -[Adding rules step to the workflow](websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md) - -[Adding/configuring a rule](websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md) - -[Making a rule affect a workflow state](websites/docs/src/content/docs/en/learn/making_a_rule_affect_a_workflow_state.md) +[Making a rule affect a workflow state](websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md) ## Case Managment The Case Management module provides a user interface for manual decision-making processes, such as approving, rejecting, or requesting re-submission of cases. It offers customizable layouts and information presentation, allowing users to efficiently handle and review cases. **Learn more about case management** -[Overview of case management](websites/docs/src/content/docs/en/learn/overview_of_case_management.md) +[Overview of case management](websites/docs/src/content/docs/en/learn/case_management_overview.md) [Using the case management dashboard](websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md) @@ -88,7 +84,7 @@ Child workflows allow for the generation and activation of extra side workflows **Learn more about child workflows** -[Adding a child workflow to your workflow](websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md) +[Adding a child workflow to your workflow](websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md) ## Plugins From 49137b7bb68f286fe8813046b8c79629a404ac3e Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:19:35 +0300 Subject: [PATCH 45/69] Update system_overview.md --- .../src/content/docs/en/getting_started/system_overview.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index e133d055c5..30b71479df 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -29,7 +29,7 @@ Whenever a risk flow ("Customer Onboarding" for example) starts, the workflow th [Configuring a workflow](websites/docs/src/content/docs/en/learn/configuring_a_workflow.md) - [Invoking a workflow](websites/docs/src/content/docs/en/learn/invoking_a_workflow.md) + [Invoking a workflow / creating a case](websites/docs/src/content/docs/en/learn/invoking_a_workflow.md) ## Collection Flows @@ -56,6 +56,7 @@ The Rules Engine applies risk rules to assign risk scores, present risk indicato **Learn more about the rule engine** [Making a rule affect a workflow state](websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md) +[Calculation Risk Scores](websites/docs/src/content/docs/en/learn/calculating_risk_scores.md) ## Case Managment The Case Management module provides a user interface for manual decision-making processes, such as approving, rejecting, or requesting re-submission of cases. It offers customizable layouts and information presentation, allowing users to efficiently handle and review cases. From d4f89237807b18650cb4e73bc4ad341febedbb63 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:26:00 +0300 Subject: [PATCH 46/69] Create calculating_risk_scores.md --- .../docs/en/learn/calculating_risk_scores.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 websites/docs/src/content/docs/en/learn/calculating_risk_scores.md diff --git a/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md b/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md new file mode 100644 index 0000000000..35d68b7bdf --- /dev/null +++ b/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md @@ -0,0 +1,41 @@ +# Calculating Risk Scores +In Ballerine, you can attach a plugin to a workflow state to perform risk evaluations. This is done by specifying the states where risk calculations should occur and the source of the rules for these calculations. + +### Example Configuration + +Here is an example configuration for calculating risk rules using a plugin: + +```json +{ + "name": "risk_evaluation", + "pluginKind": "riskRules", + "stateNames": [ + "manual_review", + "calculate_risk" + ], + "rulesSource": { + "source": "notion", + "databaseId": "ef017053c5fc418383ff3489d8f3e02b" + } +} + +``` + +### Explanation + +1. **Name (`name`)**: + - The name of the plugin, in this case, `risk_evaluation`. +2. **Plugin Kind (`pluginKind`)**: + - Specifies the type of plugin. For risk calculations, this is `riskRules`. +3. **State Names (`stateNames`)**: + - An array of states where risk calculations should be performed. In this example, the risk evaluation will be applied in the `manual_review` and `calculate_risk` states. + - These states are typically those where you want to present risk evaluations in the case management system. +4. **Rules Source (`rulesSource`)**: + - **Source (`source`)**: Indicates where the risk calculation rules are sourced from. This can be an internal database or an external source like Notion. + - **Database ID (`databaseId`)**: The ID of the database where the rules are stored. This allows for flexibility, enabling clients to add their own custom calculations. + +Rules + +Scores + +[![Case Management](https://uploads-ssl.webflow.com/62a3bad46800eb4715b2faf1/669ef7db41fab67086b6724b_rules%20scores.png)](https://www.loom.com/share/ca4e9254c4904a49ac6ac8c92f486d20?sid=62d0caf8-04d7-4ead-9f88-0ca781a5bcd2) From a4890180ea531716d95736c6637b454f1fcd5ad9 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:28:25 +0300 Subject: [PATCH 47/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index 30b71479df..7a32e2bfbf 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -56,6 +56,7 @@ The Rules Engine applies risk rules to assign risk scores, present risk indicato **Learn more about the rule engine** [Making a rule affect a workflow state](websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md) + [Calculation Risk Scores](websites/docs/src/content/docs/en/learn/calculating_risk_scores.md) ## Case Managment From a488ef6026f0a4284953a8485440e25ab8cad7c7 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:35:30 +0300 Subject: [PATCH 48/69] Update introduction.md --- .../docs/en/getting_started/introduction.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/websites/docs/src/content/docs/en/getting_started/introduction.md b/websites/docs/src/content/docs/en/getting_started/introduction.md index a61a54613d..997aa0f7ac 100644 --- a/websites/docs/src/content/docs/en/getting_started/introduction.md +++ b/websites/docs/src/content/docs/en/getting_started/introduction.md @@ -15,14 +15,19 @@ Ballerine is an Open-Source Risk Management Infrastructure that helps global pay From account-opening (KYC, KYB), underwriting, and transaction monitoring, using a flexible rules & workflow engine, 3rd party plugin system, manual review back office, and document & information collection frontend flows. ## Modules -- [**Back Office**](https://docs.ballerine.com/en/learn/case_management_overview/) - Case management dashboard for manual decision-making. -- [**Workflow Engine**](#modules) - Orchestrates and automates the different system's parts. -- [**KYB Collection Flow**](#modules) - Real-time modification of KYC/KYB frontend user journeys. -- [**Rule Engine**](#modules) - Leverage various rule types to ensure user compliance with your risk policy. -- [**Plugin System**](#modules) - Integrates with 3rd-party vendors, APIs, and databases. [see plugins](#modules). -- **No-Code Builder** - Leverage various rule types to ensure user compliance with your risk policy - 🚧 WIP. -View each component's current state in the [roadmap](#roadmap) below. +**Case management** - Case management dashboard for manual decision-making. + +**Workflow Engine** - Orchestrates and automates the different system's parts. + +**Collection Flow** - Real-time modification of KYC/KYB frontend user journeys. + +**Rule Engine** - Leverage various rule types to ensure user compliance with your risk policy. + +**Unified API** - Integrates with 3rd-party vendors, APIs, and databases. See plugins. + +And more + ## Why Open Source? We believe in enabling companies to manage user identity and risk according to their unique and evolving requirements. Ballerine empowers you to create decisioning processes right for you. It is flexible, future-proof, easy to implement, secure, and supported by a robust community. @@ -34,9 +39,6 @@ We believe in enabling companies to manage user identity and risk according to t - **Cost Reduction:** Retain control over vendor relationships, costs, and communication. - And More. -## Try Ballerine Now - -[KYB Manual Review Example](https://docs.ballerine.com/en/learn/kyb_manual_review_example/) ## Contact Ballerine To start using the paid version or if you need any assistance, reach out to us at oss@ballerine.com. Join our [Discord Channel](https://discord.gg/e2rQE4YygA) and [Slack Channel](https://join.slack.com/t/ballerine-oss/shared_invite/zt-1iu6otkok-OqBF3TrcpUmFd9oUjNs2iw) to stay updated and engage with our community. From e131e8d7ebe86c0546d45c039f70654f21fe4a37 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Tue, 23 Jul 2024 04:09:48 +0300 Subject: [PATCH 49/69] Update astro.config.mjs --- websites/docs/astro.config.mjs | 166 ++++++++++++++++++--------------- 1 file changed, 90 insertions(+), 76 deletions(-) diff --git a/websites/docs/astro.config.mjs b/websites/docs/astro.config.mjs index c4d34fd0e9..858ecb86a4 100644 --- a/websites/docs/astro.config.mjs +++ b/websites/docs/astro.config.mjs @@ -35,6 +35,10 @@ export default defineConfig({ label: `Introduction`, link: `/en/getting_started/introduction`, }, + { + label: `System Overview`, + link: `/en/getting_started/system_overview`, + }, { label: `Glossary`, link: `/en/getting_started/glossary`, @@ -64,127 +68,108 @@ export default defineConfig({ collapsed: false, items: [ { - label: `Guides`, + label: `Workflows`, items: [ { - label: `KYB Manual Review Example`, - link: `/en/learn/kyb_manual_review_example`, + label: `Understanding workflows technology`, + link: `/en/learn/workflows_technology`, }, { - label: `KYC Manual Review Example`, - link: `/en/learn/kyc_manual_review_example`, + label: `Creating a workflow`, + link: `/en/learn/creating_a_workflow`, }, { - label: `KYB Workflow with External Integrations`, - link: `/en/learn/simple_kyb_guide`, - }, - { - label: `KYC Manual Review Workflow Guide`, - link: `/en/learn/kyc_manual_review_workflow_guide`, + label: `Configuring a workflow`, + link: `/en/learn/configuring_a_workflow`, }, { - label: `Creating a KYC UI Flow`, - link: `/en/learn/creating_a_kyc_flow_and_deploying_it`, + label: `Invoking a workflow / case`, + link: `/en/learn/invoking_a_workflow`, }, ], }, { - label: `Workflows`, + label: `Collection Flows`, items: [ { - label: `Understanding Workflows`, - link: `/en/learn/understanding_workflows`, + label: `Creating a collection flow`, + link: `/en/learn/creating_a_collection_flow`, }, { - label: `Workflow Definitions`, - link: `/en/learn/workflow_definitions`, + label: `Configuring a collection flow`, + link: `/en/learn/configuring_a_collection_flow`, }, { - label: `Interacting with Workflows`, - link: `/en/learn/interacting_with_workflows`, + label: `Changing the collection flow design`, + link: `/en/learn/changing_the_collection_flow_design`, }, { - label: `Workflows Plugins`, - link: `/en/learn/plugins`, + label: 'Theming', + link: '/en/collection-flow/theming', + }, + { + label: 'Implementing in an iFrame', + link: '/en/collection-flow/iframe', }, ], }, - // { - // label: `Case Management`, - // items: [], - // }, { - label: 'KYB Collection Flow', - collapsed: false, + label: `Rule Engine`, items: [ { - label: 'Introduction', - link: '/en/collection-flow/introduction', + label: `Making a rule affect a workflow state`, + link: `/en/learn/adding_rules_and_affect_workflows`, }, { - label: 'Schema Breakdown', - link: '/en/collection-flow/schema-breakdown', + label: `Calculation Risk Scores`, + link: `/en/learn/calculating_risk_scores`, }, + ], + }, + { + label: `Case Management`, + items: [ { - label: 'UI Elements', - items: [ - { - label: 'Overview', - link: '/en/collection-flow/ui-elements', - }, - { - label: 'JSONForm', - link: '/en/collection-flow/json-form', - }, - ], + label: `Overview of case management`, + link: `/en/learn/case_management_overview`, }, { - label: 'Customization', - items: [ - { - label: 'Theming', - link: '/en/collection-flow/theming', - }, - ], + label: `Using the case management dashboard`, + link: `/en/learn/using_the_case_management_dashboard`, }, { - label: 'API', - items: [ - { - label: 'UI Definition updating', - link: '/en/collection-flow/ui-definition-updating', - }, - ], + label: `Add and Customize Workflows in the Case Management`, + link: `/en/learn/add_and_customize_workflows_in_the_case_management`, }, + ], + }, + { + label: `Unified API`, + items: [ { - label: 'Integrations', - items: [ - { - label: 'iFrame', - link: '/en/collection-flow/iframe', - }, - ], + label: `Adding a 3rd Party check to a workflow`, + link: `/en/learn/adding_a_3rd_party_check_to_a_workflow`, }, ], }, { - label: `Case Management`, + label: `Plugins`, items: [ { - label: `Overview`, - link: `/en/learn/case_management_overview`, + label: `Using Plugins`, + link: `/en/learn/plugins`, + }, + ], + }, + { + label: `Webhooks`, + items: [ + { + label: `Using webhooks`, + link: `/en/learn/how_to_use_webhooks`, }, ], }, - // { - // label: `Workflow Builder & Rule Engine`, - // items: [ - // { - // label: `Overview`, - // link: `/en/learn/workflow_builder_and_rule_engine_overview`, - // }, - // ], - // }, { label: `KYC Collection Flow (SDK)`, items: [ @@ -294,6 +279,35 @@ export default defineConfig({ // }, // ], // }, + { + label: 'Examples', + collapsed: true, + items: [ + { + label: `Guides`, + items: [ + { + label: `KYB Manual Review Example`, + link: `/en/learn/kyb_manual_review_example`, + }, + { + label: `KYC Manual Review Example`, + link: `/en/learn/kyc_manual_review_example`, + }, + { + label: `KYB Workflow with External Integrations`, + link: `/en/learn/simple_kyb_guide`, + }, + { + label: `KYC Manual Review Workflow Guide`, + link: `/en/learn/kyc_manual_review_workflow_guide`, + }, + { + label: `Creating a KYC UI Flow`, + link: `/en/learn/creating_a_kyc_flow_and_deploying_it`, + }, + ], + }, { label: `Contributing`, collapsed: true, From 4726c0c62dfeba2826ce5edd4c30f2901cd96bae Mon Sep 17 00:00:00 2001 From: Alon Peretz <8467965+alonp99@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:36:06 +0300 Subject: [PATCH 50/69] chore(backoffice): upddate process tracker plugins name --- .../workflows-service/prisma/data-migrations | 2 +- websites/docs/.astro/types.d.ts | 1145 +++++++++-------- websites/docs/astro.config.mjs | 5 +- .../en/getting_started/system_overview.md | 6 + .../adding_a_3rd_party_check_to_a_workflow.md | 9 +- 5 files changed, 656 insertions(+), 511 deletions(-) diff --git a/services/workflows-service/prisma/data-migrations b/services/workflows-service/prisma/data-migrations index b5b8cded73..ddba772eca 160000 --- a/services/workflows-service/prisma/data-migrations +++ b/services/workflows-service/prisma/data-migrations @@ -1 +1 @@ -Subproject commit b5b8cded73bdeafe792b5e5cb51780ae8a2c58a7 +Subproject commit ddba772eca12c5bd9fd9606ce0d71a1482e0153c diff --git a/websites/docs/.astro/types.d.ts b/websites/docs/.astro/types.d.ts index 288ad538a6..8f5ccab21a 100644 --- a/websites/docs/.astro/types.d.ts +++ b/websites/docs/.astro/types.d.ts @@ -1,539 +1,668 @@ declare module 'astro:content' { - interface Render { - '.mdx': Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - }>; - } + interface Render { + '.mdx': Promise<{ + Content: import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; + remarkPluginFrontmatter: Record; + }>; + } } declare module 'astro:content' { - interface Render { - '.md': Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - }>; - } + interface Render { + '.md': Promise<{ + Content: import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; + remarkPluginFrontmatter: Record; + }>; + } } declare module 'astro:content' { - export { z } from 'astro/zod'; + export { z } from 'astro/zod'; - type Flatten = T extends { [K: string]: infer U } ? U : never; + type Flatten = T extends { [K: string]: infer U } ? U : never; - export type CollectionKey = keyof AnyEntryMap; - export type CollectionEntry = Flatten; + export type CollectionKey = keyof AnyEntryMap; + export type CollectionEntry = Flatten; - export type ContentCollectionKey = keyof ContentEntryMap; - export type DataCollectionKey = keyof DataEntryMap; + export type ContentCollectionKey = keyof ContentEntryMap; + export type DataCollectionKey = keyof DataEntryMap; - // This needs to be in sync with ImageMetadata - export type ImageFunction = () => import('astro/zod').ZodObject<{ - src: import('astro/zod').ZodString; - width: import('astro/zod').ZodNumber; - height: import('astro/zod').ZodNumber; - format: import('astro/zod').ZodUnion< - [ - import('astro/zod').ZodLiteral<'png'>, - import('astro/zod').ZodLiteral<'jpg'>, - import('astro/zod').ZodLiteral<'jpeg'>, - import('astro/zod').ZodLiteral<'tiff'>, - import('astro/zod').ZodLiteral<'webp'>, - import('astro/zod').ZodLiteral<'gif'>, - import('astro/zod').ZodLiteral<'svg'>, - import('astro/zod').ZodLiteral<'avif'>, - ] - >; - }>; + // This needs to be in sync with ImageMetadata + export type ImageFunction = () => import('astro/zod').ZodObject<{ + src: import('astro/zod').ZodString; + width: import('astro/zod').ZodNumber; + height: import('astro/zod').ZodNumber; + format: import('astro/zod').ZodUnion< + [ + import('astro/zod').ZodLiteral<'png'>, + import('astro/zod').ZodLiteral<'jpg'>, + import('astro/zod').ZodLiteral<'jpeg'>, + import('astro/zod').ZodLiteral<'tiff'>, + import('astro/zod').ZodLiteral<'webp'>, + import('astro/zod').ZodLiteral<'gif'>, + import('astro/zod').ZodLiteral<'svg'>, + import('astro/zod').ZodLiteral<'avif'>, + ] + >; + }>; - type BaseSchemaWithoutEffects = - | import('astro/zod').AnyZodObject - | import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]> - | import('astro/zod').ZodDiscriminatedUnion - | import('astro/zod').ZodIntersection; + type BaseSchemaWithoutEffects = + | import('astro/zod').AnyZodObject + | import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]> + | import('astro/zod').ZodDiscriminatedUnion + | import('astro/zod').ZodIntersection; - type BaseSchema = - | BaseSchemaWithoutEffects - | import('astro/zod').ZodEffects; + type BaseSchema = + | BaseSchemaWithoutEffects + | import('astro/zod').ZodEffects; - export type SchemaContext = { image: ImageFunction }; + export type SchemaContext = { image: ImageFunction }; - type DataCollectionConfig = { - type: 'data'; - schema?: S | ((context: SchemaContext) => S); - }; + type DataCollectionConfig = { + type: 'data'; + schema?: S | ((context: SchemaContext) => S); + }; - type ContentCollectionConfig = { - type?: 'content'; - schema?: S | ((context: SchemaContext) => S); - }; + type ContentCollectionConfig = { + type?: 'content'; + schema?: S | ((context: SchemaContext) => S); + }; - type CollectionConfig = ContentCollectionConfig | DataCollectionConfig; + type CollectionConfig = ContentCollectionConfig | DataCollectionConfig; - export function defineCollection( - input: CollectionConfig, - ): CollectionConfig; + export function defineCollection( + input: CollectionConfig + ): CollectionConfig; - type AllValuesOf = T extends any ? T[keyof T] : never; - type ValidContentEntrySlug = AllValuesOf< - ContentEntryMap[C] - >['slug']; + type AllValuesOf = T extends any ? T[keyof T] : never; + type ValidContentEntrySlug = AllValuesOf< + ContentEntryMap[C] + >['slug']; - export function getEntryBySlug< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - // Note that this has to accept a regular string too, for SSR - entrySlug: E, - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; + export function getEntryBySlug< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + // Note that this has to accept a regular string too, for SSR + entrySlug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; - export function getDataEntryById( - collection: C, - entryId: E, - ): Promise>; + export function getDataEntryById( + collection: C, + entryId: E + ): Promise>; - export function getCollection>( - collection: C, - filter?: (entry: CollectionEntry) => entry is E, - ): Promise; - export function getCollection( - collection: C, - filter?: (entry: CollectionEntry) => unknown, - ): Promise[]>; + export function getCollection>( + collection: C, + filter?: (entry: CollectionEntry) => entry is E + ): Promise; + export function getCollection( + collection: C, + filter?: (entry: CollectionEntry) => unknown + ): Promise[]>; - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >(entry: { - collection: C; - slug: E; - }): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >(entry: { - collection: C; - id: E; - }): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - slug: E, - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >( - collection: C, - id: E, - ): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >(entry: { + collection: C; + slug: E; + }): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >(entry: { + collection: C; + id: E; + }): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + slug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >( + collection: C, + id: E + ): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; - /** Resolve an array of entry references from the same collection */ - export function getEntries( - entries: { - collection: C; - slug: ValidContentEntrySlug; - }[], - ): Promise[]>; - export function getEntries( - entries: { - collection: C; - id: keyof DataEntryMap[C]; - }[], - ): Promise[]>; + /** Resolve an array of entry references from the same collection */ + export function getEntries( + entries: { + collection: C; + slug: ValidContentEntrySlug; + }[] + ): Promise[]>; + export function getEntries( + entries: { + collection: C; + id: keyof DataEntryMap[C]; + }[] + ): Promise[]>; - export function reference( - collection: C, - ): import('astro/zod').ZodEffects< - import('astro/zod').ZodString, - C extends keyof ContentEntryMap - ? { - collection: C; - slug: ValidContentEntrySlug; - } - : { - collection: C; - id: keyof DataEntryMap[C]; - } - >; - // Allow generic `string` to avoid excessive type errors in the config - // if `dev` is not running to update as you edit. - // Invalid collection names will be caught at build time. - export function reference( - collection: C, - ): import('astro/zod').ZodEffects; + export function reference( + collection: C + ): import('astro/zod').ZodEffects< + import('astro/zod').ZodString, + C extends keyof ContentEntryMap + ? { + collection: C; + slug: ValidContentEntrySlug; + } + : { + collection: C; + id: keyof DataEntryMap[C]; + } + >; + // Allow generic `string` to avoid excessive type errors in the config + // if `dev` is not running to update as you edit. + // Invalid collection names will be caught at build time. + export function reference( + collection: C + ): import('astro/zod').ZodEffects; - type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; - type InferEntrySchema = import('astro/zod').infer< - ReturnTypeOrOriginal['schema']> - >; + type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; + type InferEntrySchema = import('astro/zod').infer< + ReturnTypeOrOriginal['schema']> + >; - type ContentEntryMap = { - docs: { - 'en/api/sdk/ballerine_sdk_flows.md': { - id: 'en/api/sdk/ballerine_sdk_flows.md'; - slug: 'en/api/sdk/ballerine_sdk_flows'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/api/sdk/end_user_info.md': { - id: 'en/api/sdk/end_user_info.md'; - slug: 'en/api/sdk/end_user_info'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/api/sdk/flows_backend_config.md': { - id: 'en/api/sdk/flows_backend_config.md'; - slug: 'en/api/sdk/flows_backend_config'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/api/sdk/flows_events_config.md': { - id: 'en/api/sdk/flows_events_config.md'; - slug: 'en/api/sdk/flows_events_config'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/api/sdk/flows_init_options.md': { - id: 'en/api/sdk/flows_init_options.md'; - slug: 'en/api/sdk/flows_init_options'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/api/sdk/flows_mount_options.md': { - id: 'en/api/sdk/flows_mount_options.md'; - slug: 'en/api/sdk/flows_mount_options'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/api/sdk/flows_translations.md': { - id: 'en/api/sdk/flows_translations.md'; - slug: 'en/api/sdk/flows_translations'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/collection-flow/iframe.mdx': { - id: 'en/collection-flow/iframe.mdx'; - slug: 'en/collection-flow/iframe'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/collection-flow/introduction.mdx': { - id: 'en/collection-flow/introduction.mdx'; - slug: 'en/collection-flow/introduction'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/collection-flow/json-form.mdx': { - id: 'en/collection-flow/json-form.mdx'; - slug: 'en/collection-flow/json-form'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/collection-flow/schema-breakdown.mdx': { - id: 'en/collection-flow/schema-breakdown.mdx'; - slug: 'en/collection-flow/schema-breakdown'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/collection-flow/theming.mdx': { - id: 'en/collection-flow/theming.mdx'; - slug: 'en/collection-flow/theming'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/collection-flow/ui-definition-updating.mdx': { - id: 'en/collection-flow/ui-definition-updating.mdx'; - slug: 'en/collection-flow/ui-definition-updating'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/collection-flow/ui-elements.mdx': { - id: 'en/collection-flow/ui-elements.mdx'; - slug: 'en/collection-flow/ui-elements'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/contributing.mdx': { - id: 'en/contributing.mdx'; - slug: 'en/contributing'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/deployment/ansible_deployment.mdx': { - id: 'en/deployment/ansible_deployment.mdx'; - slug: 'en/deployment/ansible_deployment'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/deployment/docker_compose.mdx': { - id: 'en/deployment/docker_compose.mdx'; - slug: 'en/deployment/docker_compose'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/examples/cdn_example.md': { - id: 'en/examples/cdn_example.md'; - slug: 'en/examples/cdn_example'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/examples/kitchen_sink_example.md': { - id: 'en/examples/kitchen_sink_example.md'; - slug: 'en/examples/kitchen_sink_example'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/examples/kyb_example.md': { - id: 'en/examples/kyb_example.md'; - slug: 'en/examples/kyb_example'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/examples/kyc_example.md': { - id: 'en/examples/kyc_example.md'; - slug: 'en/examples/kyc_example'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/examples/package_manager_example.md': { - id: 'en/examples/package_manager_example.md'; - slug: 'en/examples/package_manager_example'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/getting_started/glossary.md': { - id: 'en/getting_started/glossary.md'; - slug: 'en/getting_started/glossary'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/getting_started/installation.mdx': { - id: 'en/getting_started/installation.mdx'; - slug: 'en/getting_started/installation'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/getting_started/introduction.md': { - id: 'en/getting_started/introduction.md'; - slug: 'en/getting_started/introduction'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/back_office.mdx': { - id: 'en/learn/back_office.mdx'; - slug: 'en/learn/back_office'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/case_management_overview.md': { - id: 'en/learn/case_management_overview.md'; - slug: 'en/learn/case_management_overview'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/creating_a_kyc_flow_and_deploying_it.mdx': { - id: 'en/learn/creating_a_kyc_flow_and_deploying_it.mdx'; - slug: 'en/learn/creating_a_kyc_flow_and_deploying_it'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/embedded_sdk_api.mdx': { - id: 'en/learn/embedded_sdk_api.mdx'; - slug: 'en/learn/embedded_sdk_api'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/getting_started.mdx': { - id: 'en/learn/getting_started.mdx'; - slug: 'en/learn/getting_started'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/interacting_with_workflows.md': { - id: 'en/learn/interacting_with_workflows.md'; - slug: 'en/learn/interacting_with_workflows'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/introduction.mdx': { - id: 'en/learn/introduction.mdx'; - slug: 'en/learn/introduction'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/kit.md': { - id: 'en/learn/kit.md'; - slug: 'en/learn/kit'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/kyb_manual_review_example.mdx': { - id: 'en/learn/kyb_manual_review_example.mdx'; - slug: 'en/learn/kyb_manual_review_example'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/kyc_manual_review_example.mdx': { - id: 'en/learn/kyc_manual_review_example.mdx'; - slug: 'en/learn/kyc_manual_review_example'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/kyc_manual_review_workflow_guide.mdx': { - id: 'en/learn/kyc_manual_review_workflow_guide.mdx'; - slug: 'en/learn/kyc_manual_review_workflow_guide'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/native_mobile_apps.md': { - id: 'en/learn/native_mobile_apps.md'; - slug: 'en/learn/native_mobile_apps'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/plugins.mdx': { - id: 'en/learn/plugins.mdx'; - slug: 'en/learn/plugins'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/sdk_backend_configuration.mdx': { - id: 'en/learn/sdk_backend_configuration.mdx'; - slug: 'en/learn/sdk_backend_configuration'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/sdk_events.mdx': { - id: 'en/learn/sdk_events.mdx'; - slug: 'en/learn/sdk_events'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/sdk_translations.mdx': { - id: 'en/learn/sdk_translations.mdx'; - slug: 'en/learn/sdk_translations'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/sdk_ui_configuration.mdx': { - id: 'en/learn/sdk_ui_configuration.mdx'; - slug: 'en/learn/sdk_ui_configuration'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/sdk_ui_flows.md': { - id: 'en/learn/sdk_ui_flows.md'; - slug: 'en/learn/sdk_ui_flows'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/simple_kyb_guide.mdx': { - id: 'en/learn/simple_kyb_guide.mdx'; - slug: 'en/learn/simple_kyb_guide'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/ui_flows.mdx': { - id: 'en/learn/ui_flows.mdx'; - slug: 'en/learn/ui_flows'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.mdx'] }; - 'en/learn/understanding_workflows.md': { - id: 'en/learn/understanding_workflows.md'; - slug: 'en/learn/understanding_workflows'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/workflow_builder_and_rule_engine_overview.md': { - id: 'en/learn/workflow_builder_and_rule_engine_overview.md'; - slug: 'en/learn/workflow_builder_and_rule_engine_overview'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/learn/workflow_definitions.md': { - id: 'en/learn/workflow_definitions.md'; - slug: 'en/learn/workflow_definitions'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - 'en/style_guidelines.md': { - id: 'en/style_guidelines.md'; - slug: 'en/style_guidelines'; - body: string; - collection: 'docs'; - data: InferEntrySchema<'docs'>; - } & { render(): Render['.md'] }; - }; - }; + type ContentEntryMap = { + "docs": { +"en/api/sdk/ballerine_sdk_flows.md": { + id: "en/api/sdk/ballerine_sdk_flows.md"; + slug: "en/api/sdk/ballerine_sdk_flows"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/api/sdk/end_user_info.md": { + id: "en/api/sdk/end_user_info.md"; + slug: "en/api/sdk/end_user_info"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/api/sdk/flows_backend_config.md": { + id: "en/api/sdk/flows_backend_config.md"; + slug: "en/api/sdk/flows_backend_config"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/api/sdk/flows_events_config.md": { + id: "en/api/sdk/flows_events_config.md"; + slug: "en/api/sdk/flows_events_config"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/api/sdk/flows_init_options.md": { + id: "en/api/sdk/flows_init_options.md"; + slug: "en/api/sdk/flows_init_options"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/api/sdk/flows_mount_options.md": { + id: "en/api/sdk/flows_mount_options.md"; + slug: "en/api/sdk/flows_mount_options"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/api/sdk/flows_translations.md": { + id: "en/api/sdk/flows_translations.md"; + slug: "en/api/sdk/flows_translations"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/collection-flow/iframe.mdx": { + id: "en/collection-flow/iframe.mdx"; + slug: "en/collection-flow/iframe"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/collection-flow/introduction.mdx": { + id: "en/collection-flow/introduction.mdx"; + slug: "en/collection-flow/introduction"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/collection-flow/json-form.mdx": { + id: "en/collection-flow/json-form.mdx"; + slug: "en/collection-flow/json-form"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/collection-flow/schema-breakdown.mdx": { + id: "en/collection-flow/schema-breakdown.mdx"; + slug: "en/collection-flow/schema-breakdown"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/collection-flow/theming.mdx": { + id: "en/collection-flow/theming.mdx"; + slug: "en/collection-flow/theming"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/collection-flow/ui-definition-updating.mdx": { + id: "en/collection-flow/ui-definition-updating.mdx"; + slug: "en/collection-flow/ui-definition-updating"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/collection-flow/ui-elements.mdx": { + id: "en/collection-flow/ui-elements.mdx"; + slug: "en/collection-flow/ui-elements"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/contributing.mdx": { + id: "en/contributing.mdx"; + slug: "en/contributing"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/deployment/ansible_deployment.mdx": { + id: "en/deployment/ansible_deployment.mdx"; + slug: "en/deployment/ansible_deployment"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/deployment/docker_compose.mdx": { + id: "en/deployment/docker_compose.mdx"; + slug: "en/deployment/docker_compose"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/examples/cdn_example.md": { + id: "en/examples/cdn_example.md"; + slug: "en/examples/cdn_example"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/examples/kitchen_sink_example.md": { + id: "en/examples/kitchen_sink_example.md"; + slug: "en/examples/kitchen_sink_example"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/examples/kyb_example.md": { + id: "en/examples/kyb_example.md"; + slug: "en/examples/kyb_example"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/examples/kyc_example.md": { + id: "en/examples/kyc_example.md"; + slug: "en/examples/kyc_example"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/examples/package_manager_example.md": { + id: "en/examples/package_manager_example.md"; + slug: "en/examples/package_manager_example"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/getting_started/glossary.md": { + id: "en/getting_started/glossary.md"; + slug: "en/getting_started/glossary"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/getting_started/installation.mdx": { + id: "en/getting_started/installation.mdx"; + slug: "en/getting_started/installation"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/getting_started/introduction.md": { + id: "en/getting_started/introduction.md"; + slug: "en/getting_started/introduction"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/getting_started/system_overview.md": { + id: "en/getting_started/system_overview.md"; + slug: "en/getting_started/system_overview"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/add_and_customize_workflows_in_the_case_management.md": { + id: "en/learn/add_and_customize_workflows_in_the_case_management.md"; + slug: "en/learn/add_and_customize_workflows_in_the_case_management"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/adding_a_3rd_party_check_to_a_workflow.md": { + id: "en/learn/adding_a_3rd_party_check_to_a_workflow.md"; + slug: "en/learn/adding_a_3rd_party_check_to_a_workflow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/adding_a_child_workflow_to_your_workflow.md": { + id: "en/learn/adding_a_child_workflow_to_your_workflow.md"; + slug: "en/learn/adding_a_child_workflow_to_your_workflow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/adding_a_plugin_to_your_workflow.md": { + id: "en/learn/adding_a_plugin_to_your_workflow.md"; + slug: "en/learn/adding_a_plugin_to_your_workflow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/adding_or_configuring_a_rule.md": { + id: "en/learn/adding_or_configuring_a_rule.md"; + slug: "en/learn/adding_or_configuring_a_rule"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/adding_rules_and_affect_workflows.md": { + id: "en/learn/adding_rules_and_affect_workflows.md"; + slug: "en/learn/adding_rules_and_affect_workflows"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/adding_rules_step_to_the_workflow.md": { + id: "en/learn/adding_rules_step_to_the_workflow.md"; + slug: "en/learn/adding_rules_step_to_the_workflow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/back_office.mdx": { + id: "en/learn/back_office.mdx"; + slug: "en/learn/back_office"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/calculating_risk_scores.md": { + id: "en/learn/calculating_risk_scores.md"; + slug: "en/learn/calculating_risk_scores"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/case_management_overview.md": { + id: "en/learn/case_management_overview.md"; + slug: "en/learn/case_management_overview"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/changing_the_collection_flow_design.md": { + id: "en/learn/changing_the_collection_flow_design.md"; + slug: "en/learn/changing_the_collection_flow_design"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/configuring_a_collection_flow.md": { + id: "en/learn/configuring_a_collection_flow.md"; + slug: "en/learn/configuring_a_collection_flow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/configuring_a_workflow.md": { + id: "en/learn/configuring_a_workflow.md"; + slug: "en/learn/configuring_a_workflow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/creating_a_kyc_flow_and_deploying_it.mdx": { + id: "en/learn/creating_a_kyc_flow_and_deploying_it.mdx"; + slug: "en/learn/creating_a_kyc_flow_and_deploying_it"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/creating_a_workflow.md": { + id: "en/learn/creating_a_workflow.md"; + slug: "en/learn/creating_a_workflow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/embedded_sdk_api.mdx": { + id: "en/learn/embedded_sdk_api.mdx"; + slug: "en/learn/embedded_sdk_api"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/getting_started.mdx": { + id: "en/learn/getting_started.mdx"; + slug: "en/learn/getting_started"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/how_to_use_webhooks.md": { + id: "en/learn/how_to_use_webhooks.md"; + slug: "en/learn/how_to_use_webhooks"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/interacting_with_workflows.md": { + id: "en/learn/interacting_with_workflows.md"; + slug: "en/learn/interacting_with_workflows"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/introduction.mdx": { + id: "en/learn/introduction.mdx"; + slug: "en/learn/introduction"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/invoking_a_workflow.md": { + id: "en/learn/invoking_a_workflow.md"; + slug: "en/learn/invoking_a_workflow"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/kit.md": { + id: "en/learn/kit.md"; + slug: "en/learn/kit"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/kyb_manual_review_example.mdx": { + id: "en/learn/kyb_manual_review_example.mdx"; + slug: "en/learn/kyb_manual_review_example"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/kyc_manual_review_example.mdx": { + id: "en/learn/kyc_manual_review_example.mdx"; + slug: "en/learn/kyc_manual_review_example"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/kyc_manual_review_workflow_guide.mdx": { + id: "en/learn/kyc_manual_review_workflow_guide.mdx"; + slug: "en/learn/kyc_manual_review_workflow_guide"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/native_mobile_apps.md": { + id: "en/learn/native_mobile_apps.md"; + slug: "en/learn/native_mobile_apps"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/overview_of_case_management.md": { + id: "en/learn/overview_of_case_management.md"; + slug: "en/learn/overview_of_case_management"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/plugins.mdx": { + id: "en/learn/plugins.mdx"; + slug: "en/learn/plugins"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/sdk_backend_configuration.mdx": { + id: "en/learn/sdk_backend_configuration.mdx"; + slug: "en/learn/sdk_backend_configuration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/sdk_events.mdx": { + id: "en/learn/sdk_events.mdx"; + slug: "en/learn/sdk_events"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/sdk_translations.mdx": { + id: "en/learn/sdk_translations.mdx"; + slug: "en/learn/sdk_translations"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/sdk_ui_configuration.mdx": { + id: "en/learn/sdk_ui_configuration.mdx"; + slug: "en/learn/sdk_ui_configuration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/sdk_ui_flows.md": { + id: "en/learn/sdk_ui_flows.md"; + slug: "en/learn/sdk_ui_flows"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/simple_kyb_guide.mdx": { + id: "en/learn/simple_kyb_guide.mdx"; + slug: "en/learn/simple_kyb_guide"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/ui_flows.mdx": { + id: "en/learn/ui_flows.mdx"; + slug: "en/learn/ui_flows"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"en/learn/understanding_workflows.md": { + id: "en/learn/understanding_workflows.md"; + slug: "en/learn/understanding_workflows"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/using_the_case_management_dashboard.md": { + id: "en/learn/using_the_case_management_dashboard.md"; + slug: "en/learn/using_the_case_management_dashboard"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/workflow_builder_and_rule_engine_overview.md": { + id: "en/learn/workflow_builder_and_rule_engine_overview.md"; + slug: "en/learn/workflow_builder_and_rule_engine_overview"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/workflow_definitions.md": { + id: "en/learn/workflow_definitions.md"; + slug: "en/learn/workflow_definitions"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/learn/workflows_technology.md": { + id: "en/learn/workflows_technology.md"; + slug: "en/learn/workflows_technology"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"en/style_guidelines.md": { + id: "en/style_guidelines.md"; + slug: "en/style_guidelines"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +}; - type DataEntryMap = {}; + }; - type AnyEntryMap = ContentEntryMap & DataEntryMap; + type DataEntryMap = { + + }; - type ContentConfig = typeof import('../src/content/config'); + type AnyEntryMap = ContentEntryMap & DataEntryMap; + + type ContentConfig = typeof import("../src/content/config"); } diff --git a/websites/docs/astro.config.mjs b/websites/docs/astro.config.mjs index 858ecb86a4..0064a349fc 100644 --- a/websites/docs/astro.config.mjs +++ b/websites/docs/astro.config.mjs @@ -279,7 +279,7 @@ export default defineConfig({ // }, // ], // }, - { + { label: 'Examples', collapsed: true, items: [ @@ -308,6 +308,9 @@ export default defineConfig({ }, ], }, + ] + }, + { label: `Contributing`, collapsed: true, diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index 7a32e2bfbf..332ceeac77 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -1,3 +1,9 @@ +--- +title: System Overview +description: dsadasds +--- + + # System Overview diff --git a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md index ada5e5eb48..d17cb65827 100644 --- a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md @@ -1,3 +1,10 @@ -# Adding a 3rd Party check to a workflow +--- +title: Adding a 3rd Party check to a workflow +description: his guide provides a step-by-step process for setting up and running the Ballerine stack on your local environment. +--- + + + +Adding a 3rd Party check to a workflow To add a 3rd party check using Ballerine's unified API, please contact Ballerine at sales@ballerine.com. From 3c20d0dbfe5817251c0ed9ba5d43cc18dc95c1ef Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:40:38 +0300 Subject: [PATCH 51/69] Update workflows_technology.md --- .../docs/src/content/docs/en/learn/workflows_technology.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/workflows_technology.md b/websites/docs/src/content/docs/en/learn/workflows_technology.md index 21a68a4d9e..4acc2231b2 100644 --- a/websites/docs/src/content/docs/en/learn/workflows_technology.md +++ b/websites/docs/src/content/docs/en/learn/workflows_technology.md @@ -1,3 +1,8 @@ +--- +title: Understanding workflows technology +description: Overview of how our system uses state machines with the XState library to manage workflows effectively. +--- + # Understanding workflows technology Workflows in our system are built on top of state machines, specifically using the [XState library](https://xstate.js.org/docs/). These workflows orchestrate flows within the system, both on the backend and frontend. They are designed with an integrated plugin system, customizable templates, and durable executions. From e3b2e8e885ef0186ffc1c0330e4869c7952c7ad7 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:42:18 +0300 Subject: [PATCH 52/69] Update using_the_case_management_dashboard.md --- .../docs/en/learn/using_the_case_management_dashboard.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md index e217adecd5..8bb8430d9b 100644 --- a/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md +++ b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md @@ -1,3 +1,8 @@ +--- +title: Using the case management dashboard +description: A guide to navigating and utilizing the case management dashboard, including filters, case lists, case actions, and status indicators. +--- + # Using the case management dashboard ## **Case management sections** From 8f85c78f80f9b2f5e84c8fa47b654d0465827012 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:45:06 +0300 Subject: [PATCH 53/69] Update invoking_a_workflow.md --- .../docs/src/content/docs/en/learn/invoking_a_workflow.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md b/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md index bec3bb8bb3..6e01bbbcd8 100644 --- a/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md @@ -1,3 +1,8 @@ +--- +title: Invoking a Workflow +description: Instructions on how to invoke a workflow using the API or through the Case Management application. +--- + # Invoking a Workflow nvoking a runtime instance of a workflow definition can be done either via the API or from the Case Management application. Once a workflow is invoked, it starts running from its initial state. From 989e4dc7423f44d5edefcd9d6504f5ecaed14354 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:47:50 +0300 Subject: [PATCH 54/69] Update how_to_use_webhooks.md --- .../docs/src/content/docs/en/learn/how_to_use_webhooks.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md index 3efeb4d7c8..1ee8a3eff6 100644 --- a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md +++ b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md @@ -1,3 +1,8 @@ +--- +title: How to use webhooks +description: A guide on setting up and handling webhooks to receive real-time notifications from Ballerine's system events. +--- + # How to use webhooks ## Webhook Events From c2e37469bfcaf04822ee618488f21abe257ac4ce Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:55:57 +0300 Subject: [PATCH 55/69] Update creating_a_workflow.md --- .../docs/src/content/docs/en/learn/creating_a_workflow.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/creating_a_workflow.md b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md index 50834122e9..6139ea70d3 100644 --- a/websites/docs/src/content/docs/en/learn/creating_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md @@ -1,3 +1,8 @@ +--- +title: Creating a workflow +description: A guide on how to create a new workflow by copying an existing workflow using the API. +--- + # Creating a workflow To Create a new workflow, you can simply copy an existing workflow. From cdc4671370e96194377bba7f4727666294b62b52 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:00:59 +0300 Subject: [PATCH 56/69] Update configuring_a_workflow.md --- .../docs/src/content/docs/en/learn/configuring_a_workflow.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md b/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md index 08e6f58d0d..cef72052e8 100644 --- a/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md @@ -1,3 +1,8 @@ +--- +title: Configuring a workflow +description: A guide on how to create new versions or update existing workflows using Ballerine's dashboard. +--- + # Configuring a workflow ## Creating a New Version/Updating a Workflow From 7180bbd182a96dba16213565b84b2ff4f7720e04 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:06:54 +0300 Subject: [PATCH 57/69] Update configuring_a_collection_flow.md --- .../content/docs/en/learn/configuring_a_collection_flow.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md index eaac59fd5e..9985fd5e78 100644 --- a/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md +++ b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md @@ -1,3 +1,8 @@ +--- +title: Configuring a collection flow +description: A guide on customizing data collection flow steps and fields in Ballerine's workflow UI. +--- + # Configuring a collection flow **Customizing Data Collection Flow Steps and Fields** From bf1e1294d32c64cb8bc6c06b42cecf606182413f Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:08:00 +0300 Subject: [PATCH 58/69] Update calculating_risk_scores.md --- .../src/content/docs/en/learn/calculating_risk_scores.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md b/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md index 35d68b7bdf..ab4e2dc8ab 100644 --- a/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md +++ b/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md @@ -1,3 +1,8 @@ +--- +title: Calculating Risk Scores +description: A guide on configuring risk score calculations in workflows using plugins in Ballerine. +--- + # Calculating Risk Scores In Ballerine, you can attach a plugin to a workflow state to perform risk evaluations. This is done by specifying the states where risk calculations should occur and the source of the rules for these calculations. From 464500b38ab008452707066a25fb6b0150e5b2b8 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:10:01 +0300 Subject: [PATCH 59/69] Update adding_rules_and_affect_workflows.md --- .../docs/en/learn/adding_rules_and_affect_workflows.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md b/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md index 14b7012837..a99987344c 100644 --- a/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md +++ b/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md @@ -1,4 +1,9 @@ -# Adding rules and affect workflows +--- +title: Adding rules and affecting workflows +description: A guide on how to implement transition rules in workflows using JSON Logic to automate state changes based on specific conditions. +--- + +# Adding rules and affecting workflows ### Transition Rules From 51f4515f826837025b61e1369674a9729daa2209 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:12:48 +0300 Subject: [PATCH 60/69] Update adding_or_configuring_a_rule.md --- .../en/learn/adding_or_configuring_a_rule.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md b/websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md index 0ca85c2c82..c73856ba4e 100644 --- a/websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md +++ b/websites/docs/src/content/docs/en/learn/adding_or_configuring_a_rule.md @@ -1 +1,59 @@ +--- +title: Adding/configuring a rule +description: A guide on how to add or configure rules in a workflow. +--- + # Adding/configuring a rule + +To add more rules or modify existing ones, follow the structure provided and adjust the conditions and targets as needed: + +``` +json +"collection_flow": { + "on": { + "COLLECTION_FLOW_FINISHED": [ + { + "cond": { + "type": "json-logic", + "options": { + "rule": { + "and": [ + { + "in": [ + { + "var": "entity.data.additionalInfo.store.mcc" + }, + [ + "0742" + ] + ] + }, + { + "==": [ + { + "var": "entity.data.country" + }, + "US" + ] + } + ] + } + } + }, + "target": "rejected" + }, + { + "target": "get_vendor_data" + } + ] + }, + "tags": [ + "collection_flow" + ] +} + +``` + +In this modified example, the workflow will be auto-rejected if the MCC code is 0742 and the country is the US. Otherwise, it will continue to the `get_vendor_data` state. + +By defining transition rules, you can control the flow of your workflows based on specific conditions, ensuring automated and efficient processing. From 09e19d3233663294cf9b3244c2611903355f4112 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:14:23 +0300 Subject: [PATCH 61/69] Update adding_a_plugin_to_your_workflow.md --- .../docs/en/learn/adding_a_plugin_to_your_workflow.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md index ec6236fb81..94fd348c2b 100644 --- a/websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md +++ b/websites/docs/src/content/docs/en/learn/adding_a_plugin_to_your_workflow.md @@ -1 +1,6 @@ +--- +title: Adding a plugin to your workflow +description: a guide on how to add plugins to your workflows. +--- + # Adding a plugin to your workflow From fd358f296dbfa9b3bb8239da97eedb888444aa27 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:16:05 +0300 Subject: [PATCH 62/69] Update adding_rules_step_to_the_workflow.md --- .../docs/en/learn/adding_rules_step_to_the_workflow.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md b/websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md index bce5d24b57..5bfd2168ba 100644 --- a/websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md +++ b/websites/docs/src/content/docs/en/learn/adding_rules_step_to_the_workflow.md @@ -1 +1,6 @@ +--- +title: Adding rules step to the workflow +description: This guide provides a step-by-step process for setting up rules steps within your workflows. +--- + # Adding rules step to the workflow From 478484ba0a0bac318195dddd92ed02334c265b1f Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:18:25 +0300 Subject: [PATCH 63/69] Update adding_a_child_workflow_to_your_workflow.md --- .../en/learn/adding_a_child_workflow_to_your_workflow.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md index 76272fbc26..62054f3a3c 100644 --- a/websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md +++ b/websites/docs/src/content/docs/en/learn/adding_a_child_workflow_to_your_workflow.md @@ -1 +1,6 @@ +--- +title: Adding a child workflow to your workflow +description: A step-by-step guide for setting up and running child workflows in your workflows. +--- + # Adding a child workflow to your workflow From eecb3db62028317165d58ba0c0baf73fa0de35e0 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:19:03 +0300 Subject: [PATCH 64/69] Update adding_a_3rd_party_check_to_a_workflow.md --- .../docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md index d17cb65827..7279b99bf9 100644 --- a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md @@ -4,7 +4,6 @@ description: his guide provides a step-by-step process for setting up and runnin --- - -Adding a 3rd Party check to a workflow +# Adding a 3rd Party check to a workflow To add a 3rd party check using Ballerine's unified API, please contact Ballerine at sales@ballerine.com. From 73b9231c92709d4eb7dd30fbb97c2bb0caa8572b Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:20:52 +0300 Subject: [PATCH 65/69] Update add_and_customize_workflows_in_the_case_management.md --- .../add_and_customize_workflows_in_the_case_management.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md b/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md index 3e46129af4..4999067100 100644 --- a/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md +++ b/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md @@ -1,3 +1,8 @@ +--- +title: Add and Customize Workflows in the Case Management +description: A guide on adding filters and customizing workflows in the case management system. +--- + # Add and Customize Workflows in the Case Management ## Customizing case management workflows From e61945da89c2daf595291041d4652e9e7ae1a337 Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:23:39 +0300 Subject: [PATCH 66/69] Update overview_of_case_management.md --- .../src/content/docs/en/learn/overview_of_case_management.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/websites/docs/src/content/docs/en/learn/overview_of_case_management.md b/websites/docs/src/content/docs/en/learn/overview_of_case_management.md index 7005b02e40..371ca2e90b 100644 --- a/websites/docs/src/content/docs/en/learn/overview_of_case_management.md +++ b/websites/docs/src/content/docs/en/learn/overview_of_case_management.md @@ -1 +1,6 @@ +--- +title: Overview of case management +description: Overview of how to work with Ballerine's case management. +--- + # Overview of case management From 1cbbafa015cb780db30773a017fd8632aa1fb8bf Mon Sep 17 00:00:00 2001 From: nitzanballerine <109664420+nitzanballerine@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:24:59 +0300 Subject: [PATCH 67/69] Update system_overview.md --- .../docs/src/content/docs/en/getting_started/system_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index 332ceeac77..f01a342ae7 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -1,6 +1,6 @@ --- title: System Overview -description: dsadasds +description: An overview of Ballerine's risk management platform and its modules for building and managing custom risk flows. --- From ebe10e8e6c710175534e60f653d6834080b70278 Mon Sep 17 00:00:00 2001 From: Alon Peretz <8467965+alonp99@users.noreply.github.com> Date: Thu, 25 Jul 2024 01:13:48 +0300 Subject: [PATCH 68/69] chore(axs): plugin names --- .../workflows-service/prisma/data-migrations | 2 +- websites/docs/astro.config.mjs | 63 +++++++++---------- .../en/getting_started/system_overview.md | 5 -- ...tomize_workflows_in_the_case_management.md | 24 +++---- .../adding_a_3rd_party_check_to_a_workflow.md | 4 +- .../adding_rules_and_affect_workflows.md | 6 +- .../docs/en/learn/calculating_risk_scores.md | 5 +- .../docs/en/learn/case_management_overview.md | 3 - .../changing_the_collection_flow_design.md | 5 ++ .../en/learn/configuring_a_collection_flow.md | 10 ++- .../docs/en/learn/configuring_a_workflow.md | 4 +- .../docs/en/learn/creating_a_workflow.md | 2 - .../docs/en/learn/how_to_use_webhooks.md | 4 +- .../docs/en/learn/invoking_a_workflow.md | 7 +-- .../using_the_case_management_dashboard.md | 2 - .../docs/en/learn/workflows_technology.md | 2 - 16 files changed, 57 insertions(+), 91 deletions(-) diff --git a/services/workflows-service/prisma/data-migrations b/services/workflows-service/prisma/data-migrations index ddba772eca..46f7e2631f 160000 --- a/services/workflows-service/prisma/data-migrations +++ b/services/workflows-service/prisma/data-migrations @@ -1 +1 @@ -Subproject commit ddba772eca12c5bd9fd9606ce0d71a1482e0153c +Subproject commit 46f7e2631f901b2746852f49b43ef7c2e5dbe5ea diff --git a/websites/docs/astro.config.mjs b/websites/docs/astro.config.mjs index 0064a349fc..06c2f2293b 100644 --- a/websites/docs/astro.config.mjs +++ b/websites/docs/astro.config.mjs @@ -91,18 +91,18 @@ export default defineConfig({ { label: `Collection Flows`, items: [ - { - label: `Creating a collection flow`, - link: `/en/learn/creating_a_collection_flow`, - }, + // { + // label: `Creating a collection flow`, + // link: `/en/learn/creating_a_collection_flow`, + // }, { label: `Configuring a collection flow`, link: `/en/learn/configuring_a_collection_flow`, }, - { - label: `Changing the collection flow design`, - link: `/en/learn/changing_the_collection_flow_design`, - }, + // { + // label: `Changing the collection flow design`, + // link: `/en/learn/changing_the_collection_flow_design`, + // }, { label: 'Theming', link: '/en/collection-flow/theming', @@ -279,36 +279,31 @@ export default defineConfig({ // }, // ], // }, + { - label: 'Examples', - collapsed: true, + label: `Guides`, items: [ { - label: `Guides`, - items: [ - { - label: `KYB Manual Review Example`, - link: `/en/learn/kyb_manual_review_example`, - }, - { - label: `KYC Manual Review Example`, - link: `/en/learn/kyc_manual_review_example`, - }, - { - label: `KYB Workflow with External Integrations`, - link: `/en/learn/simple_kyb_guide`, - }, - { - label: `KYC Manual Review Workflow Guide`, - link: `/en/learn/kyc_manual_review_workflow_guide`, - }, - { - label: `Creating a KYC UI Flow`, - link: `/en/learn/creating_a_kyc_flow_and_deploying_it`, - }, - ], + label: `KYB Manual Review Example`, + link: `/en/learn/kyb_manual_review_example`, }, - ] + { + label: `KYC Manual Review Example`, + link: `/en/learn/kyc_manual_review_example`, + }, + { + label: `KYB Workflow with External Integrations`, + link: `/en/learn/simple_kyb_guide`, + }, + { + label: `KYC Manual Review Workflow Guide`, + link: `/en/learn/kyc_manual_review_workflow_guide`, + }, + { + label: `Creating a KYC UI Flow`, + link: `/en/learn/creating_a_kyc_flow_and_deploying_it`, + }, + ], }, { diff --git a/websites/docs/src/content/docs/en/getting_started/system_overview.md b/websites/docs/src/content/docs/en/getting_started/system_overview.md index f01a342ae7..7b302b74e8 100644 --- a/websites/docs/src/content/docs/en/getting_started/system_overview.md +++ b/websites/docs/src/content/docs/en/getting_started/system_overview.md @@ -4,9 +4,6 @@ description: An overview of Ballerine's risk management platform and its modules --- -# System Overview - - Ballerine is a risk management platform for performing all types of risk flows and processes. To do so, Ballerine provides the risk modules needed to build custom risk flows. You can use all modules, combinations of some modules, or just one module to perform a desired risk process. For example: @@ -44,8 +41,6 @@ All of the steps and inputs are fully customizable, to enable building different **Learn more about collection flows** -[Creating a collection flow](websites/docs/src/content/docs/en/learn/creating_a_collection_flow) - [Configuring a collection flow](websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md) [Changing the collection flow design](websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md) diff --git a/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md b/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md index 4999067100..269eba3bba 100644 --- a/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md +++ b/websites/docs/src/content/docs/en/learn/add_and_customize_workflows_in_the_case_management.md @@ -3,8 +3,6 @@ title: Add and Customize Workflows in the Case Management description: A guide on adding filters and customizing workflows in the case management system. --- -# Add and Customize Workflows in the Case Management - ## Customizing case management workflows To customize your case management to show your various workflows, add filters. @@ -14,7 +12,9 @@ Filters render your different workflows as case queues you can access via the ca To create a new filter (essentially a queue in the case management system), you can use the API endpoint. -```POST /api/v1/workflow-definition/{id}/copy``` +```bash +GET /api/v1/external/filters +``` This will return a list of existing filters, which you can use as a reference for creating new ones. @@ -22,15 +22,17 @@ This will return a list of existing filters, which you can use as a reference fo To create a new filter, make a POST request to the following endpoint: -```POST /api/v1/external/filters``` +```bash +POST /api/v1/external/filters +``` **Request Body:** You will typically need to adjust fields such as workflowDefinitionId, entity, and other relevant parameters. Below is an example request body for creating a new filter: -``` +```json { - "name": "Till Businesses Onboarding Basic Demo (US)", + "name": "Businesses Onboarding Basic Demo (US)", "entity": "businesses", "query": { "where": { @@ -97,15 +99,11 @@ You will typically need to adjust fields such as workflowDefinitionId, entity, a "childWorkflowsRuntimeData": true } }, - "projectId": "till_default" + "projectId": "default_project" } ``` - - -Case Management - ### Customizing a case’s initial attributes You can customize the "Create Case" form in the Case Management application by modifying the workflow definition. Follow these steps to tailor the input fields for your case creation: @@ -198,7 +196,7 @@ Within the workflow definition, the initial state will contain the schema for th > > **Structure Example:** -``` +```json "dataSchema": { "type": "object", "required": [ @@ -274,5 +272,3 @@ When the "Create Case" form is rendered in the Case Management application, it w For a workflow that starts with some form of communication to an end user, such as sending an email, ensure that the initial state schema includes an email field. This allows the workflow to gather the necessary email address at the point of invocation. By following these steps, you can ensure that the "Create Case" form in the Case Management application is customized to capture all the necessary information for your workflows, ensuring smooth and accurate data flow into the workflow context. - -Case Management diff --git a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md index 7279b99bf9..ff965f8cbb 100644 --- a/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/adding_a_3rd_party_check_to_a_workflow.md @@ -4,6 +4,4 @@ description: his guide provides a step-by-step process for setting up and runnin --- -# Adding a 3rd Party check to a workflow - -To add a 3rd party check using Ballerine's unified API, please contact Ballerine at sales@ballerine.com. +To add a 3rd party check using Ballerine's unified API, please contact Ballerine at support@ballerine.com. diff --git a/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md b/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md index a99987344c..5334056018 100644 --- a/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md +++ b/websites/docs/src/content/docs/en/learn/adding_rules_and_affect_workflows.md @@ -3,8 +3,6 @@ title: Adding rules and affecting workflows description: A guide on how to implement transition rules in workflows using JSON Logic to automate state changes based on specific conditions. --- -# Adding rules and affecting workflows - ### Transition Rules When building a workflow, you can add rules on events to determine the next state. For example, you can set a rule on an MCC code to auto-approve, auto-reject, or move to manual review. Ballerine supports multiple rule engines to define these rules. Below is an example using the JSON Logic rule engine. @@ -71,7 +69,7 @@ You can customize the transition rules to fit your specific workflow requirement To add more rules or modify existing ones, you can follow the structure provided and adjust the conditions and targets as needed: -``` +```json "collection_flow": { "on": { "COLLECTION_FLOW_FINISHED": [ @@ -115,5 +113,3 @@ To add more rules or modify existing ones, you can follow the structure provided ] } ``` - -[![Case Management](https://uploads-ssl.webflow.com/62a3bad46800eb4715b2faf1/669eeceed5f0d99c51777ae4_image%20136.png)](https://www.loom.com/share/6a1c6331309644d7ac49492e7047f2ae?sid=c1e6ec02-e734-4960-8358-5976942a7256) diff --git a/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md b/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md index ab4e2dc8ab..85773b723b 100644 --- a/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md +++ b/websites/docs/src/content/docs/en/learn/calculating_risk_scores.md @@ -3,7 +3,6 @@ title: Calculating Risk Scores description: A guide on configuring risk score calculations in workflows using plugins in Ballerine. --- -# Calculating Risk Scores In Ballerine, you can attach a plugin to a workflow state to perform risk evaluations. This is done by specifying the states where risk calculations should occur and the source of the rules for these calculations. ### Example Configuration @@ -39,8 +38,6 @@ Here is an example configuration for calculating risk rules using a plugin: - **Source (`source`)**: Indicates where the risk calculation rules are sourced from. This can be an internal database or an external source like Notion. - **Database ID (`databaseId`)**: The ID of the database where the rules are stored. This allows for flexibility, enabling clients to add their own custom calculations. -Rules Scores - -[![Case Management](https://uploads-ssl.webflow.com/62a3bad46800eb4715b2faf1/669ef7db41fab67086b6724b_rules%20scores.png)](https://www.loom.com/share/ca4e9254c4904a49ac6ac8c92f486d20?sid=62d0caf8-04d7-4ead-9f88-0ca781a5bcd2) + \ No newline at end of file diff --git a/websites/docs/src/content/docs/en/learn/case_management_overview.md b/websites/docs/src/content/docs/en/learn/case_management_overview.md index 97f801c327..f38f25054a 100644 --- a/websites/docs/src/content/docs/en/learn/case_management_overview.md +++ b/websites/docs/src/content/docs/en/learn/case_management_overview.md @@ -4,9 +4,6 @@ description: Case management documentation --- -## Case Management Overview - - The case management dashboard is an interface designed for agents and compliance officers. This interface allows them to manually review, make decisions, and take actions on users’ cases. The case managment can gather data from the various modules of Ballerine, such as the collection flows, 3rd party providers, rules, child workflows, plugins, and manual review agents decisions. diff --git a/websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md b/websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md index 1fc60daeee..3995e664e3 100644 --- a/websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md +++ b/websites/docs/src/content/docs/en/learn/changing_the_collection_flow_design.md @@ -1 +1,6 @@ +--- +title: Adding a 3rd Party check to a workflow +description: his guide provides a step-by-step process for setting up and running the Ballerine stack on your local environment. +--- + # Changing the collection flow design diff --git a/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md index 9985fd5e78..809f9787e4 100644 --- a/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md +++ b/websites/docs/src/content/docs/en/learn/configuring_a_collection_flow.md @@ -3,19 +3,17 @@ title: Configuring a collection flow description: A guide on customizing data collection flow steps and fields in Ballerine's workflow UI. --- -# Configuring a collection flow - -**Customizing Data Collection Flow Steps and Fields** +### Customizing Data Collection Flow Steps and Fields To adjust Ballerine’s data collection flow steps and field, you can modify the UI definition associated with your workflow. This allows you to tailor the user interface to match your specific data collection needs. -1. **Navigate to Workflow Definitions:** +1. **Navigate to Workflow Definitions:** Go to the **“Workflow Definitions”** tab in the dashboard. -2. **Edit Workflow Definition:** +2. **Edit Workflow Definition:** Select the workflow you want to customize and click the “Edit” button next to the “Definition” JSON. -3. **Adjust UI Definition:** +3. **Adjust UI Definition:** Modify the uiSchema and dataSchema within the workflow definition to match your custom data collection flow. This will ensure the UI collects the necessary data according to your requirements. ### Example of Adding MCC Components diff --git a/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md b/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md index cef72052e8..a9d649cf55 100644 --- a/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/configuring_a_workflow.md @@ -3,11 +3,9 @@ title: Configuring a workflow description: A guide on how to create new versions or update existing workflows using Ballerine's dashboard. --- -# Configuring a workflow - ## Creating a New Version/Updating a Workflow -To manage workflow definitions, you can find an interface under the [Workflow Definitions tab](https://dashboard-sb.eu.ballerine.io/) in Ballerine's dashboard. Within this section, you can view and edit existing workflows using the JSON editors. +To manage workflow definitions, you can find an interface under the Workflow Definitions tab in [**Ballerine's Dashboard**](https://dashboard-sb.ballerine.app). Within this section, you can view and edit existing workflows using the JSON editors. To modify a workflow, follow these steps: diff --git a/websites/docs/src/content/docs/en/learn/creating_a_workflow.md b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md index 6139ea70d3..a8d43a7483 100644 --- a/websites/docs/src/content/docs/en/learn/creating_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/creating_a_workflow.md @@ -3,8 +3,6 @@ title: Creating a workflow description: A guide on how to create a new workflow by copying an existing workflow using the API. --- -# Creating a workflow - To Create a new workflow, you can simply copy an existing workflow. ### Copying a Workflow diff --git a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md index 1ee8a3eff6..c977c3459d 100644 --- a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md +++ b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md @@ -3,8 +3,6 @@ title: How to use webhooks description: A guide on setting up and handling webhooks to receive real-time notifications from Ballerine's system events. --- -# How to use webhooks - ## Webhook Events Ballerine can send chosen system events through webhooks, enabling your application to be notified in real-time when specific events occur within the system. For example, when a final decision is made on a case, a webhook can be sent that includes all of the case's data (data from the collection flow, third-party providers, risk results, and manual reviewer decisions). @@ -120,7 +118,7 @@ A webhook will have the following data structure: To handle incoming webhooks, your endpoint should be able to: - Parse the JSON payload. -- Verify the webhook source (optional but recommended for security). +- Validate the source of the webhook. - Process the event data according to your application logic. ### Security Recommendations diff --git a/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md b/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md index 6e01bbbcd8..1dcf4a84c7 100644 --- a/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md +++ b/websites/docs/src/content/docs/en/learn/invoking_a_workflow.md @@ -3,14 +3,13 @@ title: Invoking a Workflow description: Instructions on how to invoke a workflow using the API or through the Case Management application. --- -# Invoking a Workflow nvoking a runtime instance of a workflow definition can be done either via the API or from the Case Management application. Once a workflow is invoked, it starts running from its initial state. ### Invoking a Workflow via API To invoke a workflow using the API, make a POST request to the following endpoint: -``` +```shell POST /api/v1/external/workflows/run ``` @@ -18,7 +17,7 @@ POST /api/v1/external/workflows/run The payload will depend on the specific workflow being invoked. Below is an example payload: -``` +```json { "workflowId": "till_basic_kyb_demo", "context": { @@ -47,7 +46,7 @@ The payload will depend on the specific workflow being invoked. Below is an exam Here’s an example of how to invoke a workflow using `curl`: -``` +```bash curl -X POST "" \\ -H "Content-Type: application/json" \\ -d '{ diff --git a/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md index 8bb8430d9b..47bc5db449 100644 --- a/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md +++ b/websites/docs/src/content/docs/en/learn/using_the_case_management_dashboard.md @@ -3,8 +3,6 @@ title: Using the case management dashboard description: A guide to navigating and utilizing the case management dashboard, including filters, case lists, case actions, and status indicators. --- -# Using the case management dashboard - ## **Case management sections** ### **Filters** diff --git a/websites/docs/src/content/docs/en/learn/workflows_technology.md b/websites/docs/src/content/docs/en/learn/workflows_technology.md index 4acc2231b2..21925966b6 100644 --- a/websites/docs/src/content/docs/en/learn/workflows_technology.md +++ b/websites/docs/src/content/docs/en/learn/workflows_technology.md @@ -3,8 +3,6 @@ title: Understanding workflows technology description: Overview of how our system uses state machines with the XState library to manage workflows effectively. --- -# Understanding workflows technology - Workflows in our system are built on top of state machines, specifically using the [XState library](https://xstate.js.org/docs/). These workflows orchestrate flows within the system, both on the backend and frontend. They are designed with an integrated plugin system, customizable templates, and durable executions. ### Why state machines? From 2e933a55d4d0cfc629db34cec2ddfff75fa1abc0 Mon Sep 17 00:00:00 2001 From: Alon Peretz <8467965+alonp99@users.noreply.github.com> Date: Thu, 25 Jul 2024 01:34:50 +0300 Subject: [PATCH 69/69] chore(axs): plugin names --- .../docs/en/learn/how_to_use_webhooks.md | 293 ++++++++++++------ 1 file changed, 205 insertions(+), 88 deletions(-) diff --git a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md index c977c3459d..73e13859ec 100644 --- a/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md +++ b/websites/docs/src/content/docs/en/learn/how_to_use_webhooks.md @@ -3,13 +3,155 @@ title: How to use webhooks description: A guide on setting up and handling webhooks to receive real-time notifications from Ballerine's system events. --- -## Webhook Events +**Ballerine supports two types of webhooks: system webhooks and custom webhooks. +These webhooks allow you to integrate external systems and automate actions based on specific events in your workflows.** -Ballerine can send chosen system events through webhooks, enabling your application to be notified in real-time when specific events occur within the system. For example, when a final decision is made on a case, a webhook can be sent that includes all of the case's data (data from the collection flow, third-party providers, risk results, and manual reviewer decisions). +## How to Use Webhooks -### Webhook Structure +Webhooks enable your application to be notified in real-time when specific events occur within the system. For example, when a final decision is made on a case, a webhook can be sent that includes all of the case’s data (data from the collection flow, third-party providers, risk results, and manual reviewer decisions). + +### System Webhooks + +System webhooks are predefined hooks that trigger on lifecycle events within the system. These events include: + +- Workflow completion +- Document state changes + +#### Subscription Levels + +System webhooks can be subscribed to at three levels: + +1. **Customer Level**: Receive all events about all workflows and system events. +2. **Workflow Definition Level**: Receive notifications about all executions of a specific workflow definition. +3. **Workflow Execution/Runtime Level**: Subscribe to events for a specific workflow instance. + +#### Example Configuration + +A workflow can take a configuration object to set up subscriptions: + +```json +{ + "config": { + "subscriptions": [ + { + "type": "webhook", + "url": "https://webhook.site/b58610f1-93fc-4922-96c6-87d259f245b8", + "events": [ + "workflow.context.document.changed" + ] + } + ] + } +} +``` + +A full run request with subscription will look like this: +```bash +curl --location 'http://localhost:3000/api/v1/external/workflows/run' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Bearer secret' \ +--data '{ + "context": { + "documents": [ + { + "properties": {}, + "pages": [ + { + "metadata": { + "pageNumber": 1 + }, + "provider": "http", + "type": "jpg", + "uri": "https://upload.wikimedia.org/wikipedia/commons/s.jpg" + } + ], + "category": "proof_of_ownership", + "type": "property_rate", + "version": 1, + "issuer": { + "country": "US" + } + }, + ], + "entity": { + "data": { + "companyName": "YTO CENTRE", + "additionalInfo": { + + }, + "businessType": "SMB" + }, + "id": "0a5212e0-ba12422222011b7", + "type": "business" + } + }, + "config": { + "subscriptions": [ + { + "type": "webhook", + "url": "https://webhook.site/b58610f1-93fc-4922-96c6-87d259f245b8", + "events": [ + "workflow.completed" + ] + } + ] + }, + "workflowId": "mp0h897g68v" +}' +``` + +System webhooks are useful for monitoring and reacting to important events in real-time. + +### Custom Webhooks + +Custom webhooks can be added as plugins to your workflows. These webhooks allow for greater flexibility and customization, enabling you to define specific actions that should be taken at various points in the workflow. + +#### Example Custom Webhook Configuration + +Here is an example of a custom webhook configuration: + +```json +{ + "name": "backend_update_webhook", + "url": "https://webhook.site/5b76ead0-70b8-494b-b639-cfc531517816", + "method": "POST", + "stateNames": [ + "calculate_risk", + "collection_flow" + ], + "headers": { + "authorization": "Bearer {secret.BUSINESS_DATA__VENDOR_API_KEY}" + }, + "request": { + "transform": { + "transformer": "jmespath", + "mapping": "{success_result: @}" + } + } +} +``` + +#### Explanation + +1. **Name (`name`)**: + - The name of the webhook, in this case, `backend_update_webhook`. +2. **URL (`url`)**: + - The URL to which the webhook should send the request. This URL is where your external system will receive the webhook payload. +3. **Method (`method`)**: + - The HTTP method to be used for the webhook request. In this example, it is set to `POST`. +4. **State Names (`stateNames`)**: + - An array of state names where the webhook should be triggered. In this example, the webhook will be triggered during the `calculate_risk` and `collection_flow` states. +5. **Headers (`headers`)**: + - Any headers that should be included in the webhook request. In this example, an `authorization` header is included, with a bearer token that references a secret key. +6. **Request (`request`)**: + - **Transform (`transform`)**: Specifies how the data should be transformed before being sent. + - **Transformer (`transformer`)**: The transformation tool to use, in this case, `jmespath`. + - **Mapping (`mapping`)**: The mapping rule for transforming the data. Here, it maps the entire payload to `success_result`. + +## Webhook Structure A webhook will have the following data structure: + ```json { "id": "uuid", @@ -31,98 +173,73 @@ A webhook will have the following data structure: "correlationId": "uuid", "environment": "sandbox", // or production "data": {} // updateContext -} +} ``` - ### Properties -- `id` - - - **Description:** Unique identifier for the webhook event. - - **Type:** `string` -- `eventName` - - - **Description:** The name of the event that triggered the webhook. - - **Type:** `string` - - **Possible Values:** - - `'workflow.context.document.completed'` - Triggered when a case is approved or rejected. - - `'workflow.context.document.updated'` - Triggered when there is an action (like a request for revisions, vendor check retrieved, etc.) made on an active case. -- `apiVersion` - - - **Description:** The version of the API used for the webhook. - - **Type:** `number` -- `timestamp` - - - **Description:** The ISO 8601 date and time when the event occurred. - - **Type:** `string` -- `assignedAt` - - - **Description:** The ISO 8601 date and time when the case was assigned. - - **Type:** `string` -- `assignee` - - - **Description:** Details of the assignee. - - **Type:** `object` - - **Properties:** - - `id` - **Type:** `string` - - `firstName` - **Type:** `string` - - `lastName` - **Type:** `string` - - `email` - **Type:** `string` -- `workflowCreatedAt` - - - **Description:** The ISO 8601 date and time when the workflow was created. - - **Type:** `string` -- `workflowResolvedAt` - - - **Description:** The ISO 8601 date and time when the workflow was resolved. - - **Type:** `string` -- `workflowDefinitionId` - - - **Description:** Unique identifier for the workflow definition. - - **Type:** `string` -- `workflowRuntimeId` - - - **Description:** Unique identifier for the workflow runtime instance. - - **Type:** `string` -- `ballerineEntityId` - - - **Description:** Unique identifier for the Ballerine entity. - - **Type:** `string` -- `correlationId` - - - **Description:** Unique identifier for correlating between entity IDs in your systems and Ballerine's system. - - **Type:** `string` -- `environment` - - - **Description:** The environment where the event occurred. - - **Type:** `string` - - **Possible Values:** `sandbox`, `production` -- `data` - - - **Description:** Additional data relevant to the event. - - **Type:** `object` - - -### Example Use Cases - -- **Notification on Case Approval/Rejection:** - - - Use the `'workflow.context.document.completed'` event to trigger notifications or update your system when a case is approved or rejected. -- **Tracking Case Updates:** - - - Use the `'workflow.context.document.updated'` event to monitor changes to active cases and take appropriate actions based on the updates (for example, when the case changes to "manual review", "revisions", "awaiting 3rd party data", and other active workflow states. - -### Handling Webhooks +- **id**: Unique identifier for the webhook event. + - Type: string +- **eventName**: The name of the event that triggered the webhook. + - Type: string + - Possible Values: + - 'workflow.context.document.completed' - Triggered when a case is approved or rejected. + - 'workflow.context.document.updated' - Triggered when there is an action (like a request for revisions, vendor check retrieved, etc.) made on an active case. +- **apiVersion**: The version of the API used for the webhook. + - Type: number +- **timestamp**: The ISO 8601 date and time when the event occurred. + - Type: string +- **assignedAt**: The ISO 8601 date and time when the case was assigned. + - Type: string +- **assignee**: Details of the assignee. + - Type: object + - Properties: + - **id**: Type: string + - **firstName**: Type: string + - **lastName**: Type: string + - **email**: Type: string +- **workflowCreatedAt**: The ISO 8601 date and time when the workflow was created. + - Type: string +- **workflowResolvedAt**: The ISO 8601 date and time when the workflow was resolved. + - Type: string +- **workflowDefinitionId**: Unique identifier for the workflow definition. + - Type: string +- **workflowRuntimeId**: Unique identifier for the workflow runtime instance. + - Type: string +- **ballerineEntityId**: Unique identifier for the Ballerine entity. + - Type: string +- **correlationId**: Unique identifier for correlating between entity IDs in your systems and Ballerine’s system. + - Type: string +- **environment**: The environment where the event occurred. + - Type: string + - Possible Values: sandbox, production +- **data**: Additional data relevant to the event. + - Type: object + +## Example Use Cases + +### Notification on Case Approval/Rejection + +Use the 'workflow.context.document.completed' event to trigger notifications or update your system when a case is approved or rejected. + +### Tracking Case Updates + +Use the 'workflow.context.document.updated' event to monitor changes to active cases and take appropriate actions based on the updates (for example, when the case changes to “manual review”, “revisions”, “awaiting 3rd party data”, and other active workflow states). + +## Handling Webhooks To handle incoming webhooks, your endpoint should be able to: -- Parse the JSON payload. -- Validate the source of the webhook. -- Process the event data according to your application logic. +- Parse the JSON payload. +- Validate the source of the webhook. +- Process the event data according to your application logic. ### Security Recommendations -- **Verify Webhook Signatures:** Ensure that the webhook requests are coming from Ballerine by verifying the signatures included in the request headers. - -- **HTTPS:** Always use HTTPS for your webhook endpoint to ensure data security during transmission. +- **Verify Webhook Signatures**: Ensure that the webhook requests are coming from Ballerine by verifying the signatures included in the request headers. +- **HTTPS**: Always use HTTPS for your webhook endpoint to ensure data security during transmission. + +By configuring system and custom webhooks, you can ensure that your workflows are integrated with external systems and can trigger automated actions based on specific events and conditions. + +You can refer to our API docs to see all system events triggered via webhooks: [Ballerine API Documentation](https://api-sb.eu.ballerine.app/api#/webhooks/postworkflows) +