From what I gather about your desire for simplicity (1. no desire to spin up a REST endpoint, and 2. no desire to work with the LF sdk), I would tackle the problem like this...
1. Create a LF form with two text fields
- one field will be for the answer ('yes' or 'no'), give it a [css] class of 'answer'
- one field will be to uniquely identify the quote, give it a class 'qid'
2. Add some JS that will run when the page loads, and will...
a. pull the query string parameter values from the URL
b. place the values in the proper fields
c. submit the form.
$(document).ready(function() {
function extractParam(qsParam) {
// if you DO NOT need to support IE, it's just...
// `return new URLSearchParams(window.location.search).get(qsParam);`
// but if you DO need to support IE it becomes more complicated
// since IE doesn't support the URLSearchParams api.
// I would refer you to this for more info on extract qs params:
// https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
// Below is one implementation that I chose solely for brevity of this answer
// (the split technique is more efficient but also more verbose,
// it's what I would actually use if I were doing this myself)
return
RegExp('[?&]' + qsParam + '=([^&]*)').exec(window.location.search) &&
decodeURIComponent(match[1].replace(/\+/g, ' '));
}
$('.answer').val(extractParam('a'));
$('.qid').val(extractParam('qid'));
$('form').submit();
});
3. Embed two links in the email with the following format:
https://<domain>/<path>?a=<answer>&qid=<quoteID>
where...
<path> is the path to the new form
<answer> would be '1' for the 'yes' link, and '0' for the 'no' link.
<quoteID> is the ID that uniquely identifies the quote
That should do the trick, but I am new to LF, so I don't know for sure. You can additionally add styles for those classes (or the entire form) that will hide them from the user, as the user really won't need to interact with them. Maybe just a visible label that says "Thank you" or whatever. Perhaps an additional line of JS to close the browser window after submission, for a nicer user experience.
------------------------------------------
UPDATE:
1. To make this cross browser compatible, you may need to perform the `$('form').submit()` after a timeout, in order to allow the inputs to actually be populated before the submit is triggered...
setTimeout(function() { $('form').submit(); });
2. I would strongly recommend using a newly generated GUID as the "qid" value, and then [as the first step of your workflow] verify that the GUID matches one you have allocated, and tie that back to your actual quote. You would want to then invalidate the GUID, so it can't be used again. This will help prevent anyone that has or guesses the URL for the form from abusing the system.
3. The form would have to be a public or anonymous form, so your client doesn't need to be authenticated in LF.