-
Notifications
You must be signed in to change notification settings - Fork 0
Added guide to integrate Point SDK and Hello Screens #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
toroduque
wants to merge
1
commit into
main
Choose a base branch
from
dt/sdk-and-hello-screens-guide
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
...tion and Best Practices Guides/How to Integrate Point SDK with Hello Screens.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| How to Integrate Point SDK with Hello Screens | ||
| ============================================= | ||
|
|
||
| ### Overview | ||
|
|
||
| This guide will walk you through the process of integrating Bluedot's Tempo with Hello Screens to provide real-time order updates and customer arrival notifications. | ||
|
|
||
| :::info | ||
| Before starting this process, ensure that the store's creation in Bluedot's dashboard is complete. If the store setup is not yet finalised, please reach out to your Bluedot Customer Experience (CX) representative for assistance with this step or reach out to our team at [help@bluedot.io](mailto:help@bluedot.io) | ||
| ::: | ||
|
|
||
| ### Step 1: Register an Order | ||
|
|
||
| To integrate Tempo with Hello Screens, start by registering an order using the `/registerOrder` endpoint of the Wave API. | ||
|
|
||
| - **Endpoint**: `POST /hello/registerOrder` | ||
| - **Purpose**: This API call registers a new order within Hello Screens. | ||
|
|
||
| **Required Parameters**: | ||
|
|
||
| - `orderId`: A unique identifier for the order. | ||
| - `destinationId`: The ID of the store or location associated with the order. | ||
|
|
||
| **Response**: | ||
|
|
||
| - The response includes a `userToken`, which is essential for the next steps in the integration. | ||
|
|
||
| For further details, refer to the [Register Order API documentation](https://events-docs.bluedot.io/#tag/hello/operation/registerOrder). | ||
|
|
||
| ### Step 2: Handling Webhooks (Optional) | ||
|
|
||
| You can retrieve the `userToken` through the **"REGISTRATION"** event type in Hello Screens webhooks. When an order is registered, this event triggers and provides a payload that includes the `userToken`, `orderId`, `destinationId`, and other relevant details. This allows your system to process the `userToken` asynchronously as the order events occur. | ||
|
|
||
| For more details on setting up and handling these webhooks, refer to the [Hello Webhooks documentation](https://docs.bluedot.io/Webhooks/Hello%20order). | ||
|
|
||
| ### Step 3: Set Custom Data in Point SDK | ||
|
|
||
| Before starting the Geo-triggering and Tempo service, it’s crucial to set the custom data in the Point SDK. Custom data allows you to attach additional context, like the `orderId` and `userToken`, to SDK events. This data is then sent along with events triggered by the SDK, ensuring that Hello Screens receives all necessary information to track and display the order status. | ||
|
|
||
| Make sure to include the `orderId` and `userToken` in the custom data configuration before initiating any of the SDK services. | ||
|
|
||
| For more details, visit the [Custom Data in SDK Events guide](https://docs.bluedot.io/Custom%20Data#custom-data-in-sdk-events). | ||
|
|
||
| ### Step 4: Initialise Point SDK’s Tempo Service | ||
|
|
||
| When starting the Tempo service in the Point SDK, you’ll need to provide a `destinationId`, which corresponds to the store where the customer is heading. This ID is crucial because it tells the SDK which store to calculate the ETA for. | ||
|
|
||
| These `destinationIds` are set by the brand during the store creation process in Bluedot’s dashboard. | ||
|
|
||
| If the customer selects a different store for a future order, update the `destinationId` to ensure accurate ETA calculations. | ||
|
|
||
| For more details, see the [Tempo integration guide](https://docs.bluedot.io/Tempo/Integrate%20the%20Point%20SDK%20in%20your%20app) and [Store Management documentation](https://docs.bluedot.io/Canvas/Store%20management). | ||
|
|
||
| ### Step 5: Start the Geo-triggering Service | ||
|
|
||
| After setting up custom data and initialising the Tempo service, the final step is to start the Geo-triggering service in the Point SDK. This service detects when a user enters or exits specific geofenced areas around the store (Usually the pickup area), enabling precise customer arrival detection. | ||
|
|
||
| For more details and implementation instructions, refer to the [Geo-triggering guide](https://docs.bluedot.io/Point%20SDK/iOS/Geo-triggering). | ||
|
|
||
| ### Step 6: Stop the Geo-triggering and Tempo Services | ||
|
|
||
| It is important to stop the Geo-triggering and Tempo services once the customer arrives at the correct store to maintain customer privacy and ensure location tracking is only active when relevant. | ||
|
|
||
| - Keep track of the `destinationId` used to start the Tempo service. | ||
| - When an Entry event is reported by the Geo-triggering service, it will include a Zone ID. | ||
| - **Verify Zone ID and Destination ID**: | ||
| - Use `getZonesAndFences()` ([Android](https://android-docs.bluedot.io/-bluedot%20-s-d-k%20-docs/au.com.bluedot.point.net.engine/-zone-info/index.html)) or `BDLocationManager.instance().zoneInfos` ([iOS](https://ios-docs.bluedot.io/Classes/BDLocationManager.html#/c:objc(cs)BDLocationManager(py)zoneInfos)) to retrieve all Zones. | ||
| - Find the Zone that matches the Zone ID from the Entry event. | ||
| - Check if the Zone's `destinationId` matches the one used to initiate Tempo (Step 4). | ||
| - If the `destinationId` matches, stop both Geo-triggering and Tempo services. | ||
|
|
||
| This ensures that customer location tracking is stopped as soon as they reach the intended store, respecting their privacy. | ||
|
|
||
| ### Conclusion | ||
|
|
||
| Following these steps, you’ll successfully integrate Point SDK with Hello Screens, providing seamless and real-time order updates directly on your store’s display. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please switch this to Orders API as first preference?