Challenge Overview
This challenge is the third in a series where we will attempt to build the components for a Mobile Sales App that uses Salesforce Backend. The premise of the of the App is for Corellian Engineering Corporation Salesperson to request sample equipment for their customers (Rebellion Space Pilots) while they are on planets that may not have wifi or any network connectivity. For this challenge we are basically re-running the first challenge but we want it in Ionic Framework which we think is totally awesome. Since the Corellian Engineering Corporation hasn’t standardized on hybrid vs mobile, we want to demonstrate both in conjunction with the Saleforce Mobile SDK. If you are a Salesforce developer who likes Angular and wants to try their hand in mobile you will love Ionic. It is basicly a Cordova wrapper with some extra tooling that allows you to code in Javascript, use a rich ionic UI library and build a binary for both IoS and Android. There is even a nifty command line tool that allows renders both version in a browser with Live Reload. It takes about a day to figure out but after that it will be all that you want to do.
Below you will see the details for the first challenge but this should be easier because we are going to give you the code (https://github.com/kbowerma/twelveparsecs) for the first challenge as reference, and ask you to rebuild it in Ionic. To make it even easier we already have a working Salesforce Org that has the schema (see the readme in github) and all you have to do is connect.
Details From First Challenge (All the Salesforce Org stuff is done. You just need to build the client )
For this first challenge we will simply focus on syncing records between the mobile device and Salesforce via the mobile SDK. There are three Salesforce objects: (1) Standard Contacts (2) Custom products__c (name, description, sku) , (3) Custom sampleRequests__c (Contact lookup, product lookup, quantity, status, delivery data, )
The Syncing strategies are as follows:
Contacts: Any contact who belongs to an account owned by the users should be synced down to the mobile.
products__c: All products should be synced down to the mobile app
sampleRequests__c: All sample requests that are owned by the user should be syncd bi-directional.
In addition we also want a 1:N authorized users to also by synced. This will be used by the delivery people who drop of the samples and need to capture a signature (next challenge) so you will need to have a junction object in Salesforce to accomplish this. This is the only object that syncs bi-directional (at this time, adding contacts will come later). The use case for this is as follows:
(1) sampleRequest gets created on the tablet with the status = “Request” and delivery date = NULL.
(2) sampleRequest record syncs (created) up to Salesforce when it is online.
(3) In Salesforce the status changes and the delivery date is filled in.
(4) sampleRequest syncs down to the tablet with the new status and delivery date set so the sales person see.
Requirements
1. Using the Salesforce Mobile SDK create a Ionic mobile app that authenticates to the provide Salesforce org (see readme in github) Checkout this Blog Post: Offline Salesforce Data For Native iOS Apps – Salesforce Mobile SDK 2.0 SmartStore by Igor for more details in how to set up the Mobile SDK for offline storage.
3. Create a simple list and detail view for contacts, products and sampleRequests on the mobile app and create the sync strategies as described above.
4. The app should be pin code protected when the device is offline, create the ability to set the pin code.
5. Support the ability to use the app in offline mode and create sampleRequests
Final Submission Guidelines
The specifics of this challenge are not nearly as important as the concepts and understanding what is possible and what is not. We are hoping to learn as much as possible about offline storage and the mobile sdk in addtion to finger signatures. If there are any features in that might be useful for our Sample Request app please call them out or add them. Please consider your documentation as educational and demonstrative.
1. Provide a quick video of your solution in action (feel free to annotate your video if you are not comfortable with spoken English or don’t like the sound of your own voice)
2. Provide great documetnation of your solution and deployement steps in your submission as readme.md
3. Provide your solution in a single zip file.