Skip to main content

Satisfaction survey incentive

ยท 3 min read
Creator of Spider

A few days ago I launched my second satisfaction survey.
By contract, Flowbird users are meant to answer these, but how to remind them without spamming them over and over again? ๐Ÿ‘‹

A tester generated the idea: link the form to Spider UI: generate an incentive for users to fill in the survey! Nice idea ๐Ÿ’ก!

I didn't want it too annoying, but I could easily add a reminder to fill in the survey for any others whose email was not in the Google Form answers.

Finding a wayโ€‹

I went straight to ChatGPT.
It's more and more an advisor!

He first told me that Google Form did not have any API to get the information.
But then he suggested to use the Google spreadsheet that is linked to Google Form and gets updated for each new answer.

Using Google Sheet API, I could easily search through the spreadsheet and find if an email is part of the respondents.
However I did not want to call Google API straight from the UI. It would mean deploying Google credentials inside the UI!
Big security risk ๐Ÿ˜จ

The best way was to do a service to encapsulate the Google Sheet API calls.
And how to do a fast and cheap backend for such a little function?
Using AWS Lambda for sure !

I then asked ChatGPT to write me a Lambda doing exactly this, using the same technologies I'm used to.
And 1 hour later, I had connected Spider UI with Google Sheet ๐Ÿ’ช.

POC.png

Nice!

Although there was no security at all in this first POC... I deployed it to benefit for of the feature to improve later.

UIโ€‹

The reminder is simple enough to start with:

  • A small popin in the bottom left corner
  • A link to the survey
  • A message telling what to do to remove it!

Reminder.png

For sure, it will change in future version. But this is a good start!

Functional improvementsโ€‹

Well, some improvements felt required quite fast:

  • Do only check for users with at least 2 months of history ๐Ÿ˜…
  • Do only check until some deadline (ex - mid december)
  • Display the popin only if check fails - don't display it at start

And they were easily to inject in while I was thinking how to secure it.
The issue was that anybody could call the API and see, by going through emails, who had answered.

I wanted to:

  • Limit the query to only the current user
    • A knowledge in Spider realm
  • Limit the API to only Spider
    • A knowledge in Floocus realm

Security improvementsโ€‹

That's been the longest work.
Making things secured.

Hopefully I had almost all ready thanks to Plugin architecture work done previously. See: Plugin store architecture.
I did some refactor, and a few hours later, here it is:

security-improvements.png

  • Networkview BFF acts as a proxy, checking the user token to get its id
  • Customers service is called to fetch the customer email
  • Using the licence service account token, Network view BFF then calls the Survey Lambda, exposed by AWS API gateway.
  • This Lambda check the service account and opens Google sheet to search for the email.
  • This triggers the display of the survey reminder ๐Ÿ˜Š

And there it is!
Surveys are now integrated into Spider product!

Neat job, don't you think? Any comments?

Contact me! ๐Ÿค—

Cheers,
Thibaut