Instance
Instance, or subscriptions, or contracts.
The instance has the necessary data to begin the execution of the strategy flow. Basically, it sends the startDate
(used to inform when the subscription services should execute the strategy for that instance/client) and the strategyId
(The execution flow that will be used for that instance/client).
Some extra information could be saved in the instance like the attributes
that could be sent as extra parameters to help in the execution flow, for example:
- Policy ID
- Contract ID
- Recurring ID (to execute payment)
- Etc…
Each client/policy that needs to be executed has a periodic flow, consuming many services to execute something, for example:
A contract that needs to charge the client monthly but needs to check first if the policy is active, and after charging the value, include in the CRM the policy contract number, the charged month, and the paid amount by the lead. In case of an error retry this flow 3 times more but delay some days for each retry.
So the execution flow will be described in the Strategy and the details to execute the flow to a specific client will be sent in the instance (like a client contract),