I was recently tasked as part of my work at DevEire to integrate a car reservation system into Toyota Long Mile. The system would communicate with Salesforce throughout the process in retrieving & updating car status as the user works through the flow. The solution would also integrate with the Stripe payment platform to accept the car registration fee.
Considerations;
- Ensuring that once the user begins the process of reserving the car, subsequent users who visit the page will see a "Reserved" notice disallowing them from reserving
- Adding a 10 minute window of which the user must finish the reservation process or risk losing the reservation
- Allowing a user to continue with their reservation should they close the browser window and return
- Ensuring that if two or more users are on the same page at the same time, the first one who hits the reserve button gets to temporarily reserve the car while the other user receives a notice
- Ensure that if the user suddenly leaves the reservation process & closes the browser in under 10 minutes, a CRON job will pick up all such pending reservations & set their status to open
We needed to discuss an appropriate process with engineers at Salesforce on the process / API calls we would use that would have the car in one of 3 states; 'Open', 'Pending' & 'Reserved'.
To make all requests a bit more secure, I needed to take a deep dive into & use OAuth2 which is a delegated authorisation framework for REST/APIs.
Technologies Used;
- HTML / JS / CSS
- Stripe
- Salesforce
- PHP
Further info coming soon..