Webhooks and Web listener - Python code decoding for understanding | XM Community
Question

Webhooks and Web listener - Python code decoding for understanding

  • 30 April 2021
  • 2 replies
  • 210 views

Userlevel 2

Hello Experts,
From the API guide I can see web hooks concept has anyone implemented web hooks? There is a mention of creating a web listener and I am trying to understand it better.
In this API link - https://qualtrics.stoplight.io/docs/gh/qualtrics/publicapidocs/docs/Guides/Common%20Tasks/listen-to-and-retrieve-responses-in-real-time.md?srn=gh/qualtrics/publicapidocs/docs/Guides/Common%20Tasks/listen-to-and-retrieve-responses-in-real-time.md
there is a mention of Python code that works by extending the BaseHTTPRequestHandler,  by creating a class called Handler class Handler(BaseHTTPRequestHandler) and then create a do_POST method there. The posted data is in scope in the self field.
I am not having expertise in Python language, so could anyone help me here to understand this web listener python code that is being used.

Appreciate your help. Thanks!

Sandhya


2 replies

TomG - I have a similar query where it says
'When you create a listener you need to stand up a web server or write a program exposed to the internet that will receive Qualtrics events and then handle them.'
Do we need to write this python code inside the Qualtrics application or outside?
I am unable to make end to end link herethat on 'creating an event listener in Qualtrics that will kick off a webhook callback'
It would be great if you can share more details around it

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/37794#Comment_37794The Python code is outside Qualtrics on a web server.
There are a number of ways to execute a web service from Qualtrics:

  1. Add a web service to the survey flow

  2. Do an ajax call from JS

  3. Call a web service from an action

Leave a Reply