Applying a hash function to embedded data during data collection: possible? | XM Community
Skip to main content

Dear Community,

is there any way to apply a (cryptographic) hash function to embedded data, server-side, during the survey flow? I.e., the user inputs something, I do some calculations on that data, then transform it using said hash function, then show it back to the user. It is important that the user can not see which function is applied, i.e. it is not an option to do the hashing in the user’s browser in JavaScript.

Unfortunately, I did not see such a possibility when scanning the options, but perhaps (hopefully) there is someone here knowing the tool better.

It seems that it is (a) possible to do basic arithmetic operations server-side using piped text / the $e{ }-operator, but nothing more involved and very little string manipulation (apart from bucketing and concatenation). (b) Possible to manipulate embedded data in JavaScript, but this will always run client-side. (c) Actually apply a MD5 function to embedded data (which would be totally what I need) as a transformation, however, these transformation can only be applied at the stage of data export, not during ongoing collection, so that the result could be shown back to the user. ehttps://www.qualtrics.com/support/xm-discover/connectors/transforming-data/applying-transformations/]

Is this correct and what I would like to do not possible, or am I misunderstanding anything / overlooking some option?

Thank you in advance!

David

You could use a lambda function with the web service block to do this.


You could use a lambda function with the web service block to do this.

@ahmedA Could you offer an example of what this would look like?

 


Please see this: https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html

Drop me a PM if you need assistance.


At Qualtrics: https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/advanced-elements/web-service/


The solution I ended up using was to send the embedded data via an API call to a hasher (hashify.net) using Web Service.
 

 


Leave a Reply