qualtrics_digital_flutter_plugin

This flutter plugin provides access to the Qualtrics Digital Website/App Feedback APIs that present a survey to an end user using the Mobile App SDK. For complete details on the supported funcntionalities and use cases, refer to the getting started doc here

API Reference

initializeProject

QualtricsDigitalFlutterPlugin().initializeProject(brandId, projectId)

This method initializes the Qualtrics singleton using the specified brand ID, project ID. This function or the initializeProjectWithExtRefId should be called prior to another function within the Qualtrics SDK. This function makes a network call to fetch the details of the given project id within the brand and once the network call has been made returns a map of interceptId and its initialization status back to the caller.

Example of values returned by initializeProject:

{"SI_12345678": "true", "SI_98765432": "false"}

initializeProjectWithExtRefId

QualtricsDigitalFlutterPlugin().initializeProject(brandId, zoneId, extRefId)

This method initializes the Qualtrics singleton using the specified brand ID, project ID, and external reference ID (for XM Directory functionality) Calling this method primes the Qualtrics singleton for integration with XM Directory.This function makes a network call to fetch the details of the given project id within the brand and once the network call has been made returns a map of interceptId and its initialization status back to the caller.

Example of values returned by initializeProjectWithExtRefId:

{"SI_12345678": "true", "SI_98765432": "false"}

evaluateProject

QualtricsDigitalFlutterPlugin().evaluateProject()

This method evaluates all intercepts that have been initialized based on their targeting logic and returns the results back to the caller of the function.

Example of values returned by evaluateProject:

{"SI_123456789": {"passed": "true", "surveyUrl": "https://survey.qualtrics.com", "creativeType": "MobileEmbeddedFeedback", "error": "null"}}

display

QualtricsDigitalFlutterPlugin().display()

This method displays the specified creative(s). Typically, you need to check whether the creative should be displayed by evaluating an intercept's logic using the evaluateProject method. If a specific intercept is being evaluated using evaluateIntercept, then displayIntercept must be used rather than display.

evaluateIntercept

QualtricsDigitalFlutterPlugin().evaluateIntercept(interceptId)

This method evaluates the specified intercept based on the intercept's targeting logic and returns the result of the evaluation back to the caller of the function.

Example of values returned by evaluateIntercept:

{"interceptId": "SI_123456789", "passed": "true", "surveyUrl": "https://survey.qualtrics.com", "creativeType": "MobileEmbeddedFeedback", "error": "null"}

displayIntercept

QualtricsDigitalFlutterPlugin().displayIntercept(interceptId)

This method displays the creative associated with the passing Action Set for the given Intercept. Typically, you need to evaluate whether the creative should be displayed by evaluating an intercept's logic using the evaluateProject or evaluateIntercept methods.

displayTarget

QualtricsDigitalFlutterPlugin().displayTarget(surveyUrl)

Similar to display() but utilized to bypass the creative and only show the intercept target (typically a Qualtrics survey).

setLogLevel

QualtricsDigitalFlutterPlugin().setLogLevel(logLevel)

Method used to set the logging level of Qualtrics's okhttp, useful for debugging pre-prod app builds. Qualtrics will default to "none" unless overridden with this method. Takes info or none This method is only available on apps built for android.

registerViewVisit

QualtricsDigitalFlutterPlugin().registerViewVisit(viewName)

You can use this method to record visits to a particular view. For more information about Intercept statistics, see User Analytics with the Mobile App SDK.

resetTimer

QualtricsDigitalFlutterPlugin().resetTimer()

This method resets the usage timer that is available to the intercept on the server as Time Spent in App.

resetViewCounter

QualtricsDigitalFlutterPlugin().resetViewCounter()

This method resets the view count to zero. It is available to the intercept as the View Count value in the intercept display logic.

setString

QualtricsDigitalFlutterPlugin().setString(key, value)

Sets the string value for the specified key. The value can be sent back to the server and can be used to evlaute an intercepts targeting logic. For an example, see Using Embedded Data.

setNumber

QualtricsDigitalFlutterPlugin().setNumber(key, value)

Sets the double value for the specified key. The value can be sent back to the server and can be used to evlaute an intercepts targeting logic. For an example, see Using Embedded Data.

setDateTime

QualtricsDigitalFlutterPlugin().setDateTime(key)

Sets the current system time to the specified key. The value can be sent back to the server and can be used to evlaute an intercepts targeting logic. For an example, see Using Embedded Data.

Libraries

qualtrics_digital_flutter_plugin