Triggered Emails

Dear All,

I have managed to enable the Triggered emails to be sent but I am seemingly unable to update the dynamic content within the email for example I am developing a OTAC (One Time Access Code) generator and in the code below I have a dataset with 3 individual number sets; Set 1, Set 2, Set 3 on the email and random1,2,3, field created in the data collection and would like the email to reflect the value of these fields when the OTAC is requested, at present the email is just received with “set: random1”? any help would be great? @yisrael-wix

$w.onReady( function () {
$w(“#FirstOTAC”).onClick(() => {
if (wixUsers.currentUser.loggedIn) {
const userId = wixUsers.currentUser.id;

  wixUsers.emailUser('emailCodehere', wixUsers.currentUser.id, { 
      variables: { 

“field:comp-jqqnxxe5.random1”: “random1”,
“field:comp-jqqnxxe5.random2”: “random2”,
“field:comp-jqqnxxe5.random3”: “random3”
}
})
.then(() => {
$w(‘#emailSent’).expand();
})
. catch ((err) => {
// handle error that prevented the email from being sent
});
}
});
});