Device Onboarding
In order to onboard a customer to Residential Flex (formerly known as ResiFlex), they must register a device with Kraken.
📣 Note: ResiFlex Onboarding does not handle tariff switching. If you want the customer to be on a specific tariff, you will need to handle this separately.
Residential Flex's onboarding journey is implemented as an "onboarding
wizard". Start a wizard with the startSmartFlexOnboarding mutation.
Each start or step-completion mutation returns the wizard and its
currentStep, which indicates what the user needs to do next.
The onboarding journey is considered "complete" when the currentStep
returns null.
Persist the wizard ID and use smartFlexOnboardingWizards to resume an
interrupted journey or refresh a waiting step.
Foundation does not persist or resume wizards, or automatically refresh waiting steps. Production integrations must add this behavior.
Onboarding Wizard​
To onboard a device, the user must progress through the onboarding wizard by fetching
and completing the current onboarding step until the current step returns null, signifying a successful onboarding.
Start onboarding wizard​
To begin a new onboarding journey, you can use the following mutation:
Start a re-authentication wizard​
If a device needs to be re-authenticated, you can start a re-authentication wizard using the following mutation:
Cancel onboarding wizard​
To cancel an onboarding journey, you can use the following mutation:
📣 Note: cancelling an onboarding wizard will not delete a device that has already been registered. If you want to delete a device, you will need to use the deauthenticateFlexDevice mutation.
Fetch onboarding wizard(s)​
This is useful for:
- Polling the current step, e.g. while waiting for
WaitForLiveIntegrationor another externally completed step. - Returning a user to an onboarding wizard if they leave it.
Onboarding Step​
The step order is dynamic, so when fetching the current step the query must be ready to accept any step type.
A few important points:
- The
currentStepfield in thesmartFlexOnboardingWizardsquery will return the current step of the onboarding journey. - To change a reversible selection, call
selectFromListForSmartFlexOnboardingwith the wizard, step, and option IDs. Older type-specific selection mutations are deprecated. - Not all onboarding steps are reversible. For example, device registration cannot be reversed.
An example of how this could look is as follows (note: this example does not include all possible step types):
Most steps have their own mutation that must be called in order to complete the step and enable the user to move to the next step.
Proceed to the Device Type pages for more detailed information on the individual onboarding steps.