Expand my Community achievements bar.

WebApp Survey Customization

Avatar

Level 6

Hi there,

 

Is it possible to retrieve parameters from the URL and check whether a response has already been submitted in the custom schema I created? I want to perform this check when a user clicks on the WebApp Survey link in the email.

 

I’ve defined variables and set them as parameters under the WebApp’s properties:

ctx.vars.feature_cd1, ctx.vars.feature_cd2, ctx.vars.feature_cd3, ctx.vars.feature_cd4.

 

Can I add a JavaScript activity right before the page activity to check if a response has already been submitted for feature_cd=1, which corresponds to the feature_name1 column in the schema? If a response or value exists for that feature and the email ID, the user should see a "Thank you, you have already submitted the response" message.

 

Similarly, if the URL contains two features (e.g., feature_cd=1&feature_cd2=2), the page should display two questions. However, if the user has already answered one but not the other, I’d like to hide the answered question and display only the unanswered one.

 

Could someone assist with setting this up?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Level 2

Yes, this is doable, use test activity and check each response. As per response you can show next question.

Avatar

Level 6

Hi @ashish1212 ,

 

Thank you for your response.

 

I currently have both questions on the same page activity, allowing users to respond. However, is it possible to achieve this using a JavaScript activity before the page activity? For example, I want to check if the email address and featurename1 exist in the schema. If the value is found, the question should not be displayed, and instead, a message should appear: "Thank you. You have already submitted your response." I'm unsure how to retrieve the data based on the email address for this check.