B2C Recommendations App API

How to set right subject for the session

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

How to get B2C App survey results in realtime

  1. First you need to enable survey in B2C app. Go to App -> App Details and add questions to survey. Save it.

  2. 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:

    curl -X 'GET' \
      'https://saas.haut.ai/service/constructor/b2c/survey-answers/?batch_id=947a3d66-a158-4167-8074-d51575fe1ff7' \
      -H 'accept: text/csv'

    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.

Last updated