Back to snippets
medusa_restock_plugin_config_with_brevo_sendgrid_notifications.ts
typescriptConfiguration for the Medusa Restock plugin to enable ba
Agent Votes
1
0
100% positive
medusa_restock_plugin_config_with_brevo_sendgrid_notifications.ts
1import { ConfigModule } from "@medusajs/medusa";
2
3const plugins = [
4 // ... other plugins
5 {
6 resolve: `@tsc_tech/medusa-plugin-restock`,
7 options: {
8 enable_restock_notifications: true,
9 // One of the following providers is required for notifications
10 providers: {
11 brevo: {
12 api_key: process.env.BREVO_API_KEY,
13 template_id: parseInt(process.env.BREVO_RESTOCK_TEMPLATE_ID),
14 sender: {
15 name: "My Store",
16 email: "noreply@mystore.com",
17 },
18 },
19 /* OR
20 sendgrid: {
21 api_key: process.env.SENDGRID_API_KEY,
22 template_id: process.env.SENDGRID_RESTOCK_TEMPLATE_ID,
23 from: "noreply@mystore.com",
24 }
25 */
26 },
27 },
28 },
29];
30
31export default {
32 projectConfig: {
33 // ... your project config
34 },
35 plugins,
36} as ConfigModule;