WebView Overview
The web onboarding flow can be integrated into a native app by placing it inside of a webview. Integrating with the web flow is fairly straightforward and can be conceptually broken up into two tasks:
- Build the WebView URL
- Listen to the url redirect event fired inside the WebView when the user completes the view
Build the WebView URL
Here's the bare minimum URL you'll need to render the onboarding flow into a WebView:
https://accounts.branchapp.com?embedded=true&callbackUrl=https://www.url.com&org={{organization_id}}
Query Parameters
The URL accepts the following query parameters:
Parameter | Requirement | Description |
---|---|---|
embedded | Required | Always set to true . Displays onboarding without surrounding layout |
org | Required | Your assigned Branch organization ID |
callbackUrl | Required | The URL to redirect to once the flow has been completed |
emp | Optional | Send the user's employee ID to be attached to their account |
firstName | Optional | Prefill the first name field in the flow |
lastName | Optional | Prefill the last name field in the flow |
phoneNumber | Optional | Prefill the phone number in the flow (only numbers, no separators) |
emailAddress | Optional | Prefill the email address in the flow (must pass valid email address) |
Responding to Completed Onboarding
Once your users have completed the flow, they will be redirected to the callbackUrl
provided in the URL. You can listen for the URL to change and respond in your app accordingly.