Sunday 6 December 2020

How to embed a Survey component in a community page


Follow the below steps to Embed Salesforce Survey component on the community page:
Pre-requisites



1) Go to Setup-->All Community and create a new community by choosing any template.


2) Once the community gets created, click on the builder.


3) In the builder, click on the gear icon and then click on the guest user profile.



4) Edit the guest user profile and provide Read Access on Survey and Survey Invitation objects and Read, Create and Edit on Survey Response Object, and save.







5) Then in the community builder click on the publish button on the top right to get your community published.


6) Now go to setup --> All Community --> Open workspaces for the community you just created, open Administration, and click on "Activate Community"






7) Once your community is activated, add it to survey settings by going to setup --> Survey Setting and add as below under "Select the default community for creating public survey invitations."









8) Once the community set-up part is done, create a Survey, and activate it once done.


9) Open the Survey builder for the above Survey and generate the default Survey Invitation URLs for "Participants outside your company"








Notice- The invitation URL domain is the same as your default community domain which you had set in the Survey settings in step 7.


** Also if you want guest users to take that survey, then 'Check' the option 'Don't require authentication'


10) To embed the survey in your community pages, go to setup --> All Community --> Open workspaces for the community you created above and open the builder.


11) In community builder, click on the first lightning icon on the top left and type survey in the search bar.












12) Drag and drop the Survey component to the block you want to place it, and then choose the Survey name (of the Survey you created above) in the component configuration details.









13) Now click on the publish button on the top right to save the new changes.




14) Open the community page in runtime and you will be able to see the survey component rendered on your community in runtime.


Note- For each new Community you want to embed a Survey Component, you need to follow steps 3-14 again for that community for it to work. 

Guest user profile for each community is different, so we need to ensure for any new Community's Guest user profile is granted all Survey Objects related permissions again, and also default Survey Invitation (based on new Community's domain) is also required to be generated for it to work.  
















No comments:

Post a Comment

How to generate QR code for Survey Invitation in Salesforce Platform Survey

 Easy steps to generate QR code for Survey Invitation Link 1) Create your Survey using Salesforce Platform Survey. 2) Once done activate it....