This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function onTrack(event, settings) { | |
if (event.event !== settings.eventName) { | |
return; | |
} | |
const product = event.properties.products[0]; | |
const itemPurchased = `${product.brand} ${product.name}`; | |
const Body = `Thank you for purchasing ${itemPurchased} from our site. We will follow-up with the tracking details shortly.`; | |
const To = settings.twilioDestinationNumber; |