From a161f689b971ee734e2f055ca580f06c6cc2bb98 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 18 Sep 2023 15:06:09 +0300 Subject: [PATCH] docs: fix SendGrid's dynamic_template_data property (#5112) --- .../content/modules/customers/backend/send-confirmation.md | 2 +- .../modules/orders/backend/handle-order-claim-event.md | 2 +- .../content/modules/orders/backend/send-order-confirmation.md | 2 +- www/docs/content/modules/users/backend/send-invite.md | 2 +- www/docs/content/plugins/notifications/sendgrid.mdx | 2 +- www/docs/content/plugins/other/restock-notifications.md | 2 +- www/docs/content/recipes/commerce-automation.mdx | 4 ++-- www/docs/content/recipes/digital-products.mdx | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/www/docs/content/modules/customers/backend/send-confirmation.md b/www/docs/content/modules/customers/backend/send-confirmation.md index a50cbdfe9a..d251b05699 100644 --- a/www/docs/content/modules/customers/backend/send-confirmation.md +++ b/www/docs/content/modules/customers/backend/send-confirmation.md @@ -170,7 +170,7 @@ class CustomerConfirmationSubscriber { templateId: "customer-confirmation", from: "hello@medusajs.com", to: data.email, - data: { + dynamic_template_data: { // any data necessary for your template... first_name: data.first_name, last_name: data.last_name, diff --git a/www/docs/content/modules/orders/backend/handle-order-claim-event.md b/www/docs/content/modules/orders/backend/handle-order-claim-event.md index 93edc6187b..1f3b07110e 100644 --- a/www/docs/content/modules/orders/backend/handle-order-claim-event.md +++ b/www/docs/content/modules/orders/backend/handle-order-claim-event.md @@ -184,7 +184,7 @@ class ClaimOrderSubscriber { templateId: "order-claim-confirmation", from: "hello@medusajs.com", to: data.old_email, - data: { + dynamic_template_data: { link: `http://example.com/confirm-order-claim/${data.token}`, // other data... }, diff --git a/www/docs/content/modules/orders/backend/send-order-confirmation.md b/www/docs/content/modules/orders/backend/send-order-confirmation.md index fd5cb8a4e5..6daba82aa3 100644 --- a/www/docs/content/modules/orders/backend/send-order-confirmation.md +++ b/www/docs/content/modules/orders/backend/send-order-confirmation.md @@ -241,7 +241,7 @@ class OrderConfirmationSubscriber { templateId: "order-confirmation", from: "hello@medusajs.com", to: order.email, - data: { + dynamic_template_data: { // any data necessary for your template... items: order.items, status: order.status, diff --git a/www/docs/content/modules/users/backend/send-invite.md b/www/docs/content/modules/users/backend/send-invite.md index 4f46daf0b6..70bd9fb724 100644 --- a/www/docs/content/modules/users/backend/send-invite.md +++ b/www/docs/content/modules/users/backend/send-invite.md @@ -176,7 +176,7 @@ class InviteSubscriber { templateId: "send-invite", from: "hello@medusajs.com", to: data.user_email, - data: { + dynamic_template_data: { // any data necessary for your template... token: data.token, }, diff --git a/www/docs/content/plugins/notifications/sendgrid.mdx b/www/docs/content/plugins/notifications/sendgrid.mdx index 5018cf0ad2..4049333e5d 100644 --- a/www/docs/content/plugins/notifications/sendgrid.mdx +++ b/www/docs/content/plugins/notifications/sendgrid.mdx @@ -3989,7 +3989,7 @@ const sendOptions = { templateId: "d-123....", from: "ACME ", to: "customer@mail.com", - data: { dynamic: "data" }, + dynamic_template_data: { dynamic: "data" }, } sendgridService.sendEmail(sendOptions) diff --git a/www/docs/content/plugins/other/restock-notifications.md b/www/docs/content/plugins/other/restock-notifications.md index 51bec1e6f2..c95bd768ea 100644 --- a/www/docs/content/plugins/other/restock-notifications.md +++ b/www/docs/content/plugins/other/restock-notifications.md @@ -158,7 +158,7 @@ class RestockNotificationSubscriber { templateId: "restock-notification", from: "hello@medusajs.com", to: emails, - data: { + dynamic_template_data: { // any data necessary for your template... variant, }, diff --git a/www/docs/content/recipes/commerce-automation.mdx b/www/docs/content/recipes/commerce-automation.mdx index a54cf5ef91..12aa344d64 100644 --- a/www/docs/content/recipes/commerce-automation.mdx +++ b/www/docs/content/recipes/commerce-automation.mdx @@ -164,7 +164,7 @@ class NewNoteSubscriber { templateId: "order-update", from: "hello@medusajs.com", to: order.email, - data: { + dynamic_template_data: { // any data necessary for your template... note_text: note.value, note_author: note.author.first_name, @@ -623,7 +623,7 @@ class SendProductsNewsletterSubscriber { name: customer.first_name, email: customer.email, })), - data: { + dynamic_template_data: { // any data necessary for your template... products, }, diff --git a/www/docs/content/recipes/digital-products.mdx b/www/docs/content/recipes/digital-products.mdx index e6f6d1da1a..26d86fb670 100644 --- a/www/docs/content/recipes/digital-products.mdx +++ b/www/docs/content/recipes/digital-products.mdx @@ -1055,7 +1055,7 @@ class HandleOrderSubscribers { templateId: "digital-download", from: "hello@medusajs.com", to: order.email, - data: { + dynamic_template_data: { // any data necessary for your template... digital_download_urls: urls, },