Feeding Question Answers into the Online Booking Widget

It expects an encoded URI of an encoded base 64 JSON string:

encodeURI(btoa(JSON.stringify(answersObj)));


The JSON is a collection of questionId as key and question answer as value: 


{"[questionId]": "string"}


The question ID can be obtained by our questions API. Or requesting this from support@qudini.com

There’s a limit to the size of the query param which is 2000 characters. That’s a browser hard limit.

This should then be passed to the booking widget via a query string qa. 


For example: 


/booking-widget/storefinder/1MC1E19SEDD1?qa=eyI2IjoiTm8iLCI3IjoiTm8iLCI4IjoiTm8iLCI5IjoiTm8iLCIxMCI6Ik5vIiwiMTEiOiJObyIsIjEyIjoiTm8iLCIxMyI6Ik5vIiwiMTQiOiJObyIsIjE1IjoiTm8iLCIxNiI6Ik5vIiwiMTciOiJZZXMifQ==

decodes to 

{"6":"No","7":"No","8":"No","9":"No","10":"No","11":"No","12":"No","13":"No","14":"No","15":"No","16":"No","17":"Yes"}

When the answers are passed to our booking page, the corresponding questions are hidden from the user but passed during the create booking process and stored with the customer record. 


As customer questions are configurable and subject to change, you should be aware of what will happen under different scenarios where Questions and Answers are being passed through the URL:


Scenario

Outcome / Behaviour

Full set of Questions and Answers fed into booking URL.

 

  • Your Visit page is hidden.

  • Booking is created, answers are successfully applied to the customer questions.

  • When Joining questions can also be displayed and edited on the weblink (needs to configured by Qudini personnel).

Partial questions and answers fed into booking URL.

  • Displays the only questions that aren't answered to the customer.

  • Answers that are provided are successfully applied to the customer questions when booking is created.

Questions are fed through, but no answers fed into booking URL.

  • Displays the questions that aren't answered to the customer.

Feeding an answer through to a wrong question type. I.e. Feeding a Yes/No Radio Button Question type with a Text String.

  • Your Visit page is hidden - so it behaves as though it's answered.

  • Booking is created, answers are successfully applied to the customer questions.

  • Qudini will force a wrong answer type: e.g. a string into a Radio button or Number field.

  • It will still show in the app as the string you fed through the URL.


Feeding an AFTER JOINING QUESTION to the booking URL.

  • The After Joining Question is not answered.

  • It also hides the Question from the customer in the weblink but remains unanswered in the staff app.

Did you find it helpful? Yes No