In this article
1: Obtaining a Public API key
To permit your mobile application to access a Forsta Plus server, your account manager will need to request that an External Client ID and Client Secret be created for your company. The required scope: pub.mobilesurveysdk
Please note that this key will be a separate Public API key that you may be using for other programmatic access to the site.
2: Digital Feedback Program Setup
Digital Feedback allows you to configure when surveys should be displayed within your mobile app. And like surveys, you can also adjust this configuration at any time without needing an app update!
2.1: Create a Digital Feedback Program
Like Survey Designer, you can access the Digital Feedback application on the Forsta Plus platform. If you do not see the Digital Feedback module, please contact your Forsta account manager.
In Digital Feedback, select New Program > Create New Program
SDK programs differ from web programs, ensure you select Mobile SDK for Program Type:
Select the Overview page and copy the Program key.
Send this key and the client ID and secret you received above to your mobile app development team as this is the first step they need as part of integrating the SDK.
3: Create a Survey
The SDK can be used to trigger any number of surveys, each with their own triggering rules. To get started, create a survey using Survey Designer as you would normally. The SDK can display online/web surveys within your mobile app in a similar way as Digital Feedback can for your web site. Alternatively, you can create a survey that can be rendered natively within your app, providing a much more seamless and customized experience. To show a web survey in your app, create a survey in Survey Designer and select Web mode:
If you plan to present this survey using native survey rendering, either using the built-in native rendering or provide your own custom presentation, select the survey mode SDK in addition to Web:
The native survey engine provided in the Mobile SDK does not have the same capabilities as the full web surveys provide, this is the keep the SDK compact and fast in your application. For native survey design, See Designing Surveys for Mobile App SDK for more information about designing surveys for native rendering.
Create a Digital Feedback Scenario
Next, create one or more scenarios for your program. A scenario is simply a script (JavaScript) that will be loaded into the SDK. It is suggested to create separate scenarios for each event that you are interested in triggering a survey. This will allow you to monitor the progress of each scenario (e.g. completes per hour, day, etc) but also will simplify testing and granular control by enabling or disabling at any time.
Let’s use a simple example where a user in your app taps a Feedback button. Your app would then send an event to the SDK “onFeedbackButton”. The SDK listens for all events from your app, the following scenario will trigger a survey when this event is received.
var ctx = sdk();
ctx.events.on("onFeedbackButton", function(data) {
ctx.startWebSurvey("p123456789", {});
});
Use the survey ID for the survey you created above.
Mobile App Implementation
Your app development team can now begin integration. All information can be found on our GitHub site.
Your development team will require the following information:
• a Client ID and secret key to permit your application to connect to a Forsta Plus server.
• the program key (e.g. F3tpzi) for the Digital Feedback program you created earlier.
Obtaining the Mobile SDK
The SDK is distributed via: