Client Side Flow
All the endpoints consumed in this page can be found here »
To get started you need a couple of endpoints to different parts of Fast Track integration. You also need a pusher key. All this will be returned from the config endpoint.
When you have the config object from previous request and also the current users sid and lastly, a brand name you can continue. Now you want to login to Fast Track using the sid. That will be done against authentication endpoint.
On success, the LoginAuthToken endpoint will return a user object which contains values for setting up pusher. Pusher will authenticate with an endpoint in Fast Tracks backend. When you are authenticated to pusher you can bind upon which events you want to listen to. Currently Fast Track CRM supports three push notification "event types":
When you have bound the events to your functions populating the front end on messages you are done with the push notifications web socket part.
When using pusher on the client side you can either load pusher with a html script tag or via npm. Read more here about Pusher js. Pusher also has other libraries if you want to use pusher for your mobile app. Pusher docs
But there is more! What if the push notification was sent to the user when the user wasn't logged in? There is an endpoint for listing all existing messages a user has. Look in the API Endpoint Section at "Get All Notifications".
If you want to distinguish messages received / read by the user you can mark a notification as read using the following endpoint. When received the notifications from the endpoints above next time, the notification will be marked as read and you can take care of that in your JS / front end.
Have a look at "Mark Notification As Read" endpoint.
Please let us know if you have any further questions!
Happy coding! 🚀