Real-Time Personalization® (RTP) technology allows you to provide each app user with a personalized user experience in real-time. The personalization is powered by the app user's genes.
The following is a detailed real example of the Weather My Way +RTP app, which we developed with Real-Time Personalization technology. The open-source code is accessible from our GitHub repository.
Step 1: The first step in the process of creating any app is to enable your user to login to Sequencing.com using their Sequencing.com account.
-
The base URL is: https://sequencing.com
-
So that a user may login the following API should be invoked:
-
Method name: /indexApi.php?q=sequencing/webservice/user/lookup&api-key=Your-Key
-
The api-key is the developer key that you received when you signed up for a developer account and registered your application.
-
Method Type: POST
-
Parameters:
-
Return Value: JSON
-
uid: user id
-
email: user email
-
apiKey: API key required for subsequent API requests.
-
persona: Persona ID to which the user belongs
-
first_name: Users First Name
-
last_name: Users Last Name
Step 2: In this step we are going to ask the geographical location such as the city from the user, so we can download the weather data for that location. You may use any API of your choice to get weather data, we only show one of the many possibilities.
-
Base URL: http://api.openweathermap.org/data/2.5/weather
-
Method Type: POST
-
Parameters:
-
Return Value: JSON
-
Next we want to get a list of files the user has available for analysis. Please note by default few sample files will also be made available.
-
Base URL: /sqapi/analysisService.svc
-
Method Name: DataFileList
-
Method Type: GET
-
Parameters:
-
Return Value: JSON
-
List of file names and ID available to the user.
-
You will be required to parse the list and present the data as you wish such as in a dropdown or table.
Step 3: In this step we are going to take the input file selected in the previous step and trigger/start the melanoma analysis app. The app will then return data that we can combine with the weather data.
-
Base URL: /sqapi/analysisService.sv
-
Method Name: StartApp
-
Method Type: POST
-
Parameters:
-
Return Value: JSON
Step 4: In this step we are going to take the JobID returned in the previous step and check if the job is pending/completed.
-
Base URL: /sqapi/analysisService.svc
-
Method Name: CheckAppStatus
-
Method Type: GET
-
Parameters:
-
Return Value: JSON
Step 5: If the app status returned is "Completed" then we can get the risk values and combine with the weather data.
-
Base URL: /sqapi/analysisService.svc
-
Method Name: GetAppResults
-
Method Type: GET
-
Parameters:
-
Return Value: JSON
- The return value will be risk for melanoma such as "Low", "Moderate", "High" and "Very High". This risk value can be combined with the weather data so the app will offer real-time personalization.
Step 6: In this step there is no API calls to be made. Here we combine the risk value we obtained with the weather data. A couple of examples are cited below. As a developer you may display the results in any way that your app demands.
If Sunny and temp is over 70 degrees F then based on the person's Melanoma Risk the following could appear as an app notification via the app:
-
Lower Risk and Normal Risk of Melanoma = It's going to be a sunny day today! Sequencing.com analyzed your genes and wanted to remind you that even though you are not at an increased risk for skin cancer, you should either put on sunscreen today or avoid the sun because too much sun exposure can cause premature aging.
-
Slightly Increased Risk and Moderate Risk of Melanoma = It's going to be a sunny day today! Sequencing.com analyzed your genes and it's important that you apply a broad-spectrum sunscreen with a SPF of 30 or higher this morning to your face, neck, arms and any other exposed skin. You should also reapply the sunscreen again at around noon and we'll remind you at that time so you don't forget. If you'd like to know why this personalized recommendation is being made, please click here.
-
High Risk and Very High Risk of Melanoma = It's going to be a sunny day today! Sequencing.com analyzed your genes and it's extremely that you apply a broad-spectrum sunscreen with a SPF of 30 or higher this morning to your face, neck, arms and any other exposed skin. You should also reapply the sunscreen again at around noon and we'll remind you at that time so you don't forget. If you'd like to know why this personalized recommendation is being made, please click here.
Related
Developer Center