SurveyURLAPI

The purpose of the Survey URL API is to give clients a way to launch a post chat survey. The API returns a URL which must be opened in an external browser or in a Webview. This API must be invoked prior to making close Engagement API request.

SDK also provides an easy way of retreiving surveyURL if agent left the conversation before User initiates the close. NuanMessaging.getInstance().getSurveyURL(), This only fetches surveyURL if agent closes the engagement before user click close button.

  1. Using the Survey URL API
  2. Accessing the Survey URL Response
  3. Code Example
Public Methods

Public Methods
Public Methods
  • public int getStatusCode()

    getStatusCode method returns following values which denotes the status of this request.


    400: Request has incorrect parameters.

    403: The user does not have sufficient privileges to use the API or to access the requested site.

    500: Server error.



	 SurveyURLAPI surveyurl = new SurveyURLAPI();
	surveyurl.getSurveyData(new OnSuccessListener<SurveyUrlResponse>() {
		@Override
		public void onResponse(SurveyUrlResponse response) {
			webView = (WebView) findViewById(R.id.webview);
			webView.loadUrl(response.getSurveyUrl()+"?"+response.getSurveyData());
		}
	}, new OnErrorListener() {
		@Override
		public void onErrorResponse(Response response) {
			System.out.println(response.getStatusCode());
		}
	});