API for Skin Consultant Recommendations App
Last updated
Last updated
B2C App runs in the user's browser and usually sets fingerprint as subject name like qFUGbSgWfwq3AnUyKrbnou If you do know your users you can provide name for a subject as ?name=yourSubjectName in URL of business app. This subject name will be visiable in Dataset created per B2C App ie https://saas.haut.ai/b2c/first-entrance?app_id=80&company_id=42872ecf-1734-473d-8883-9d731cbe1a2a&name=subject1
First you need to enable survey in B2C app. Go to App -> App Details and add questions to survey. Save it.
Navigate to dataset related to B2C App. Usually it has the same name with the B2C App and you can also see a link to dataset in the list of applications
In the dataset go to configuration and configure webhook. This webhook will be fired every time image is processed and will contain subjectName you have provided in first step here and batchId that identifies the session for the end user. This will be needed in next step
On your backend you will get webhook hit, get batchId from json payload and use it to call API GET b2c/survey-answers like this:
Link to swagger: https://saas.haut.ai/service/constructor/docs/#/b2c/get_survey_answers_b2c_survey_answers__get Thats it! This way you can get survey answers for particular users give in realtime.