docs: fix SendGrid's dynamic_template_data property (#5112)
This commit is contained in:
@@ -170,7 +170,7 @@ class CustomerConfirmationSubscriber {
|
|||||||
templateId: "customer-confirmation",
|
templateId: "customer-confirmation",
|
||||||
from: "hello@medusajs.com",
|
from: "hello@medusajs.com",
|
||||||
to: data.email,
|
to: data.email,
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
// any data necessary for your template...
|
// any data necessary for your template...
|
||||||
first_name: data.first_name,
|
first_name: data.first_name,
|
||||||
last_name: data.last_name,
|
last_name: data.last_name,
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ class ClaimOrderSubscriber {
|
|||||||
templateId: "order-claim-confirmation",
|
templateId: "order-claim-confirmation",
|
||||||
from: "hello@medusajs.com",
|
from: "hello@medusajs.com",
|
||||||
to: data.old_email,
|
to: data.old_email,
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
link: `http://example.com/confirm-order-claim/${data.token}`,
|
link: `http://example.com/confirm-order-claim/${data.token}`,
|
||||||
// other data...
|
// other data...
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ class OrderConfirmationSubscriber {
|
|||||||
templateId: "order-confirmation",
|
templateId: "order-confirmation",
|
||||||
from: "hello@medusajs.com",
|
from: "hello@medusajs.com",
|
||||||
to: order.email,
|
to: order.email,
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
// any data necessary for your template...
|
// any data necessary for your template...
|
||||||
items: order.items,
|
items: order.items,
|
||||||
status: order.status,
|
status: order.status,
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class InviteSubscriber {
|
|||||||
templateId: "send-invite",
|
templateId: "send-invite",
|
||||||
from: "hello@medusajs.com",
|
from: "hello@medusajs.com",
|
||||||
to: data.user_email,
|
to: data.user_email,
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
// any data necessary for your template...
|
// any data necessary for your template...
|
||||||
token: data.token,
|
token: data.token,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3989,7 +3989,7 @@ const sendOptions = {
|
|||||||
templateId: "d-123....",
|
templateId: "d-123....",
|
||||||
from: "ACME <acme@mail.com>",
|
from: "ACME <acme@mail.com>",
|
||||||
to: "customer@mail.com",
|
to: "customer@mail.com",
|
||||||
data: { dynamic: "data" },
|
dynamic_template_data: { dynamic: "data" },
|
||||||
}
|
}
|
||||||
|
|
||||||
sendgridService.sendEmail(sendOptions)
|
sendgridService.sendEmail(sendOptions)
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class RestockNotificationSubscriber {
|
|||||||
templateId: "restock-notification",
|
templateId: "restock-notification",
|
||||||
from: "hello@medusajs.com",
|
from: "hello@medusajs.com",
|
||||||
to: emails,
|
to: emails,
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
// any data necessary for your template...
|
// any data necessary for your template...
|
||||||
variant,
|
variant,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class NewNoteSubscriber {
|
|||||||
templateId: "order-update",
|
templateId: "order-update",
|
||||||
from: "hello@medusajs.com",
|
from: "hello@medusajs.com",
|
||||||
to: order.email,
|
to: order.email,
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
// any data necessary for your template...
|
// any data necessary for your template...
|
||||||
note_text: note.value,
|
note_text: note.value,
|
||||||
note_author: note.author.first_name,
|
note_author: note.author.first_name,
|
||||||
@@ -623,7 +623,7 @@ class SendProductsNewsletterSubscriber {
|
|||||||
name: customer.first_name,
|
name: customer.first_name,
|
||||||
email: customer.email,
|
email: customer.email,
|
||||||
})),
|
})),
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
// any data necessary for your template...
|
// any data necessary for your template...
|
||||||
products,
|
products,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1055,7 +1055,7 @@ class HandleOrderSubscribers {
|
|||||||
templateId: "digital-download",
|
templateId: "digital-download",
|
||||||
from: "hello@medusajs.com",
|
from: "hello@medusajs.com",
|
||||||
to: order.email,
|
to: order.email,
|
||||||
data: {
|
dynamic_template_data: {
|
||||||
// any data necessary for your template...
|
// any data necessary for your template...
|
||||||
digital_download_urls: urls,
|
digital_download_urls: urls,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user