Order confirmation email with all items ordered

Hi, rightly or wrongly I am currently trying to use Sendgrid API to send an order confirmation email once the customer completes the order after checkout. My actual sending of a simple email is working fine but can somebody please advise how I can list the individual items that the customer has ordered within the body of the email?

Is it even possible with Sendgrid or does anybody have any experience with anything else?

The cart items are initially stored within a subcollection of users called 'cartitems'. When the order is placed I then create a new document in another subcollection called 'orders' which pulls in the cart items and order number and order total.

I thought I could create a string variable within the API call with a type of 'Is List' and then map the values in to the body of the email, however this does not seem to work.

Does anybody have any suggestions please?

Thanks

2
9 replies