Question T10481
Visible to All Users

Integration with Javascript Application

created 2 years ago

Hi,

I am a .Net developer.

I have a business related professional development application. The front end is vanilla javascript. The back end is .net core c# with ms sql database.

I want to integrate SurveyJS.

How can the survey creation work? Can I create the survey and questions using the SurveyJS dashboard and then send my user results back to you (rather than storing in my own db)?

I would like to

  1. Create and manage surveys on SurveyJS dashboard
  2. Use API call to call my SurveyJS survey into my site
  3. Users complete survey on my site
  4. I send the results back to SurveyJS
  5. I can retrieve the results and some statistics from SurveyJS

Can I do this with SurveyJS? Is there a better option for me?

If I can do this, which package should I buy to meet my needs?

Thank you

Vincent Stack

Answers approved by surveyjs Support

created 2 years ago (modified 2 years ago)

Hello Vincent,
Thank you for contacting us.

Yes, you can use SurveyJS Library/Runner (available free of charge) to complete your task.

Create surveys at https://surveyjs.io/Service/MySurveys

You can create surveys and store them on our website: https://surveyjs.io/Service/MySurveys.
Clipboard-File-3.png

Click Create a Survey and use the online Survey Creator to create surveys as per your requirements.
Clipboard-File-4.png

SurveyJS contains 20+ built-in question types (plus you may create custom ones). Various customization capabilities allow you to create surveys of different configurations targeting different business areas. Some examples are available at Real Examples.

Integrate Survey component to your website

To integrate the survey runner into your website, follow Get Started with SurveyJS. To link a survey runner with surveys from your personal MySurveys storage at surveyjs.io and allow users take surveys, expand a survey node and copy the survey Id:
Clipboard-File-5.png
Assign the survey Id to the surveyId attribute of the survey JSON: Load Survey.
To load survey results to our cloud, specify the surveyPostId: Save Survey Result.

Analyze Results

If you wish to analyze survey results, you can do this directly at MySurveys: just select a survey and click Results:
Clipboard-File-6.png

Now, you're all done.

Please let me note that with this option, your application's surveys basically depend on the third-party https://surveyjs.io/Service/MySurveys service. The MySurveys service is supposed to act more like a demo: to let users and developers to evaluate capabilities of SurveyJS products. Unfortunately, we we may not guarantee this service 100% uptime. To use SurveyJS in production environment, you may consider embedding the survey widget to your front-end app and implementing a backend service. It is absolutely possible to build a backend service with .NET. This way, you take full control over your survey service and storage. For more information on how to integrate SurveyJS with backend, refer to our documentation.

Please let me know if you have any questions or require further assistance.

Thank you,
Jane
SurveyJS Team

    Show previous comments (1)

      You're always welcome, Vincent.

      MySurveys service actually provides a public API. However, the public API doesn't contains methods for accessing surveys and results. While we basically advise against using private API, you can access surveys and results using corresponding methods available as a part of a private API:

      Once you create a backend server, we recommend that you proceed with storing and accessing surveys and results there.

      No charge or additional package is required.

      Drop me a line if anything remains unclear.

      Thanks,
      Jane

        The public API is what I need… so essentially, once a survey is complete. I can see the results via your dashboard and later, when I implement my back end, I will call the api for results (in JSON format) and store in my db, correct?

        Vincent

          Yes, correct. You can run and analyze your surveys at https://surveyjs.io/Service/MySurveys. Then, use the getSurveyInfo / getSurveyResults private API methods to retrieve surveys and results and save them to your data storage.

          You can further proceed saving and loading surveys to/from your data storage. Once you offload surveys and results to your custom storage, analyzing surveys online will no longer available because surveys will be actually stored in your system.
          To analyze surveys, you may wish to consider purchasing an Analytics pack. If you also require creating surveys with a Survey Creator, consider a Pro subscription, which includes all SurveyJS products. For more information on available subscription plans, refer to https://surveyjs.io/Buy.

          Please feel free to contact us in case of any additional questions.