Files
medusa-store/docs/content/plugins/notifications/sendgrid.mdx
Shahed Nasser 6f1b49af03 chore: merge docs from master to develop (#3650)
* Fix issue on fixed total amount discount when using includes tax (#3472)

The calculation of the fixed discount amount breaks when having includes_tax setting active, due to the line item totals are incorrect and returning everything as 0, thus the totalItemPercentage will be Infinitiy due to the division by a subtotal of 0

* chore: Add missing changeset for @medusajs/medusa

* feat(medusa): Improve performance of Products domain (#3417)

* feat(medusa): Improve product update performances

* fix tests and update

* update mock repo

* improve repo

* cleanup

* fix

* cleanup + bulk emit + unit test fix

* improvements

* improve

* fix unit tests

* fix export

* fix product update handler

* enhance mock repo

* fix import integration

* fix end point tests

* revert mock repo product variant

* fix unit

* cleanup

* cleanup

* address feedback

* fix quotes in tests

* address feedback

* Create new-tips-mate.md

* use types

* chore: Remove integration-tests from changeset

* chore(release): v1.7.14

* chore(docs): Generated Docs Announcement Bar (automated) (#3489)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>

* fix(medusa): EventBusService.emit using Redis mock (#3491)

* Fix eventBusService.emit using redis mock

* revert gitignore

* enqueuer

* unit test add redis_url

* fix test

* chore(docs): Generated Services Reference (automated) (#3490)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>

* docs: publish restructure (#3496)

* docs: added features and guides overview page

* added image

* added version 2

* added version 3

* added version 4

* docs: implemented new color scheme

* docs: redesigned sidebar (#3193)

* docs: redesigned navbar for restructure (#3199)

* docs: redesigned footer (#3209)

* docs: redesigned cards (#3230)

* docs: redesigned admonitions (#3231)

* docs: redesign announcement bar (#3236)

* docs: redesigned large cards (#3239)

* docs: redesigned code blocks (#3253)

* docs: redesigned search modal and page (#3264)

* docs: redesigned doc footer (#3268)

* docs: added new sidebars + refactored css and assets (#3279)

* docs: redesigned api reference sidebar

* docs: refactored css

* docs: added code tabs transition

* docs: added new sidebars

* removed unused assets

* remove unusued assets

* Fix deploy errors

* fix incorrect link

* docs: fixed code responsivity + missing icons (#3283)

* docs: changed icons (#3296)

* docs: design fixes to the sidebar (#3297)

* redesign fixes

* docs: small design fixes

* docs: several design fixes after restructure (#3299)

* docs: bordered icon fixes

* docs: desgin fixes

* fixes to code blocks and sidebar scroll

* design adjustments

* docs: restructured homepage (#3305)

* docs: restructured homepage

* design fixes

* fixed core concepts icon

* docs: added core concepts page (#3318)

* docs: restructured homepage

* design fixes

* docs: added core concepts page

* changed text of different components

* docs: added architecture link

* added missing prop for user guide

* docs: added regions overview page (#3327)

* docs: added regions overview

* moved region pages to new structure

* docs: fixed description of regions architecture page

* small changes

* small fix

* docs: added customers overview page (#3331)

* docs: added regions overview

* moved region pages to new structure

* docs: fixed description of regions architecture page

* small changes

* small fix

* docs: added customers overview page

* fix link

* resolve link issues

* docs: updated regions architecture image

* docs: second-iteration fixes (#3347)

* docs: redesigned document

* design fixes

* docs: added products overview page (#3354)

* docs: added carts overview page (#3363)

* docs: added orders overview (#3364)

* docs: added orders overview

* added links in overview

* docs: added vercel redirects

* docs: added soon badge for cards (#3389)

* docs: resolved feedback changes + organized troubleshooting pages (#3409)

* docs: resolved feedback changes

* added extra line

* docs: changed icons for restructure (#3421)

* docs: added taxes overview page (#3422)

* docs: added taxes overview page

* docs: fix sidebar label

* added link to taxes overview page

* fixed link

* docs: fixed sidebar scroll (#3429)

* docs: added discounts overview (#3432)

* docs: added discounts overview

* fixed links

* docs: added gift cards overview (#3433)

* docs: added price lists overview page (#3440)

* docs: added price lists overview page

* fixed links

* docs: added sales channels overview page (#3441)

* docs: added sales overview page

* fixed links

* docs: added users overview (#3443)

* docs: fixed sidebar border height (#3444)

* docs: fixed sidebar border height

* fixed svg markup

* docs: added possible solutions to feedback component (#3449)

* docs: added several overview pages + restructured files (#3463)

* docs: added several overview pages

* fixed links

* docs: added feature flags + PAK overview pages (#3464)

* docs: added feature flags + PAK overview pages

* fixed links

* fix link

* fix link

* fixed links colors

* docs: added strategies overview page (#3468)

* docs: automated upgrade guide (#3470)

* docs: automated upgrade guide

* fixed vercel redirect

* docs: restructured files in docs codebase (#3475)

* docs: restructured files

* docs: fixed eslint exception

* docs: finished restructure loose-ends (#3493)

* fixed uses of backend

* docs: finished loose ends

* eslint fixes

* fixed links

* merged master

* added update instructions for v1.7.12

* docs: fixed discount details (#3499)

* docs: fix trailing slash causing 404 (#3508)

* docs: fix error during navigation (#3509)

* docs: removed the gatsby storefront guide (#3527)

* docs: removed the gatsby storefront guide

* docs: fixed query value

* chore(docs): Removed Docs Announcement Bar (automated) (#3536)

Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>

* fix(medusa): Variant update should include the id for the listeners to be able to identify the entity (#3539)

* fix(medusa): Variant update should include the id for the listeners to be able to identify the entity

* fix unit tests

* Create brave-seahorses-film.md

* docs: fix admin redirects (#3548)

* chore(release): v1.7.15

* chore(docs): Generated Docs Announcement Bar (automated) (#3550)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>

* chore(docs): Generated Services Reference (automated) (#3551)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* chore: updated READMEs of plugins (#3546)

* chore: updated READMEs of plugins

* added notice to plugins

* docs: added a deploy guide for next.js storefront (#3558)

* docs: added a deploy next.js guide

* docs: fix image zoom

* docs: fixes to next.js deployment guide to vercel (#3562)

* chore(workflows): Enable manual workflow in pre-release mode (#3566)

* chore(docs): Removed Docs Announcement Bar (automated) (#3598)

Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>

* fix(medusa): Rounding issues on line item adjustments (#3446)

* chores(medusa): Attempt to fix discount rounding issues

* add migration

* update entities

* apply multipler factor properly

* fix discount service

* WIP

* fix rounding issues in discounts

* fix some tests

* Exclude raw_discount_total from responses

* fix adjustments

* cleanup response

* fix

* fix draft order integration

* fix order integration

* fix order integration

* address feedback

* fix test

* Create .changeset/polite-llamas-sit.md

* remove comment

---------

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* chore(workflows): Add release notification (#3629)

---------

Co-authored-by: pepijn-vanvlaanderen <pepijn@webbers.com>
Co-authored-by: olivermrbl <oliver@mrbltech.com>
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-03-31 09:34:38 +02:00

3988 lines
117 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 'Learn how to integrate SendGrid with the Medusa backend. Learn how to install the SendGrid plugin and test it out.'
addHowToData: true
---
# SendGrid
In this document, youll learn about the [SendGrid plugin](https://github.com/medusajs/medusa/tree/master/packages/medusa-plugin-sendgrid), what it does, and how to use it.
<div>
<video width="100%" height="100%" playsinline autoplay muted controls>
<source src="https://user-images.githubusercontent.com/59018053/154807282-1e72671f-1936-411d-b914-e05c6597693a.mp4" type="video/mp4" />
</video>
</div>
## Overview
[SendGrid](https://sendgrid.com) is an email and notification service that can be used to send emails to your customers and users.
By integrating SendGrid with Medusa, youll be sending email notifications to your users in the following cases:
1. Order-related events include new orders, shipments created, and orders canceled.
2. Swaps and Returns related events including new return requests of orders and items returned successfully.
3. When Gift Cards in an order are created.
4. User-related events including reset passwords.
5. Restock Notifications for when product stocks are low.
---
## Prerequisites
Before going further with this guide make sure you have a Medusa backend set up. You can follow the [Quickstart guide](../../development/backend/install.mdx).
You also must have [Redis configured on your Medusa backend](../../development/backend/prepare-environment.mdx#redis). Sending emails is done through Subscribers, which uses Redis as the event queue. If you dont set up Redis, the plugin will not send emails.
---
## Create a SendGrid Account
If you dont have a SendGrid account, make sure to [create one](https://signup.sendgrid.com) first. You also need to set up a [single sender](https://docs.sendgrid.com/ui/sending-email/sender-verification) first in SendGrid before you can start sending emails.
### API Key
For the integration to work, you need to create an API key in your SendGrid account.
You can do that by choosing from the sidebar of your SendGrid dashboard Settings > API Keys. Then, click on Create API Key.
:::note
If you choose to give the API Key restricted access, make sure to at least give it the “Mail Send” access.
:::
Once you create the API key, the key will be shown for one time only. Make sure to copy and save it somewhere for later usage.
### Email Templates
The SendGrid plugin uses SendGrid templates to send emails. If you dont provide the plugin with the templates necessary then emails will not be sent.
To create an email template, go to Email API > Dynamic Templates. Then, click “Create a Dynamic Template”. Youll then be able to see the Template ID which youll need for your plugin setup.
When you create the dynamic templates youll be able to use variables sent from Medusa [using Handlebars](https://docs.sendgrid.com/for-developers/sending-email/using-handlebars).
For a full list of templates and their variables please check out the [Template Reference](#template-reference).
:::tip
Medusa supports localization so you can also create multiple templates for multiple languages.
:::
---
## Template Reference
This section covers the template types supported by the plugin and what variables you can expect in your dynamic template. You can use the variables to add details like order total or customer name.
:::note
You dont have to create a template for every type in the reference. You can simply create templates for the type of emails you want to send using Medusa and SendGrid,
:::
### Order Placed
**Key in plugin options:** `order_placed_template`
**Description:** Template to be sent to the customer when they place a new order.
<details>
<summary>Example Data</summary>
```json noReport
{
"beforeInsert": [Function],
"billing_address": null,
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"claims": Array [],
"created_at": Any<Date>,
"currency_code": "usd",
"customer": Object {
"billing_address_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"email": "test@testson.com",
"first_name": null,
"has_account": false,
"id": Any<String>,
"last_name": null,
"metadata": null,
"phone": null,
"updated_at": Any<Date>,
},
"customer_id": Any<String>,
"date": Any<String>,
"discount_total": "0.00 USD",
"discounts": Array [],
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"fulfillments": Array [],
"gift_card_total": "0.00 USD",
"gift_card_transactions": Array [],
"gift_cards": Array [],
"has_discounts": 0,
"has_gift_cards": 0,
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"discounted_price": "12.00 USD",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": "test-item",
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"price": "12.00 USD",
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Intelligent Plastic Chips",
"totals": Object {
"discount_total": 0,
"gift_card_total": 0,
"original_tax_total": 400,
"original_total": 2400,
"quantity": 2,
"subtotal": 2000,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"tax_total": 400,
"total": 2400,
"unit_price": 1000,
},
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"locale": null,
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"payments": Array [],
"refunded_total": 0,
"refunds": Array [],
"region": Object {
"automatic_taxes": true,
"created_at": Any<Date>,
"currency_code": "usd",
"deleted_at": null,
"fulfillment_providers": Array [],
"gift_cards_taxable": true,
"id": "test-region",
"metadata": null,
"name": "Test region",
"payment_providers": Array [
PaymentProvider {
"id": "test-pay",
"is_installed": true,
},
],
"tax_code": null,
"tax_provider_id": null,
"tax_rate": 12.5,
"updated_at": Any<Date>,
},
"region_id": "test-region",
"returns": Array [],
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"shipping_methods": Array [],
"shipping_total": "0.00 USD",
"status": "pending",
"subtotal": "24.00 USD",
"subtotal_ex_tax": "20.00 USD",
"swaps": Array [],
"tax_rate": null,
"tax_total": "4.00 USD",
"total": "24.00 USD",
"updated_at": Any<Date>,
}
```
</details>
### Order Canceled
**Key in plugin options:** `order_canceled_template`
**Description:** Template to be sent to a customer when their order is canceled.
<details>
<summary>Example Data</summary>
```json noReport
{
"beforeInsert": [Function],
"billing_address": null,
"billing_address_id": null,
"canceled_at": Any<Date>,
"cart_id": null,
"claims": Array [],
"created_at": Any<Date>,
"currency_code": "usd",
"customer": Object {
"billing_address_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"email": "test@testson.com",
"first_name": null,
"has_account": false,
"id": Any<String>,
"last_name": null,
"metadata": null,
"phone": null,
"updated_at": Any<Date>,
},
"customer_id": Any<String>,
"date": Any<String>,
"discount_total": "0.00 USD",
"discounts": Array [],
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "canceled",
"fulfillments": Array [],
"gift_card_total": "0.00 USD",
"gift_card_transactions": Array [],
"gift_cards": Array [],
"has_discounts": 0,
"has_gift_cards": 0,
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": null,
"has_shipping": null,
"id": "test-item",
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"price": "10.00 USD",
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": null,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 12,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"locale": null,
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "canceled",
"payments": Array [],
"refunded_total": 0,
"refunds": Array [],
"region": Object {
"automatic_taxes": true,
"created_at": Any<Date>,
"currency_code": "usd",
"deleted_at": null,
"fulfillment_providers": Array [],
"gift_cards_taxable": true,
"id": "test-region",
"metadata": null,
"name": "Test region",
"payment_providers": Array [
PaymentProvider {
"id": "test-pay",
"is_installed": true,
},
],
"tax_code": null,
"tax_provider_id": null,
"tax_rate": 12.5,
"updated_at": Any<Date>,
},
"region_id": "test-region",
"returns": Array [],
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"shipping_methods": Array [
Object {
"cart_id": null,
"claim_order_id": null,
"data": Object {},
"id": Any<String>,
"order_id": Any<String>,
"price": 0,
"return_id": null,
"shipping_option": Object {
"admin_only": false,
"amount": 500,
"created_at": Any<Date>,
"data": Object {},
"deleted_at": null,
"id": Any<String>,
"is_return": false,
"metadata": null,
"name": "free",
"price_type": "flat_rate",
"profile_id": Any<String>,
"provider_id": "test-ful",
"region_id": "test-region",
"updated_at": Any<Date>,
},
"shipping_option_id": Any<String>,
"swap_id": null,
"tax_lines": Array [],
},
],
"shipping_total": "0.00 USD",
"status": "canceled",
"subtotal": "20.00 USD",
"swaps": Array [],
"tax_rate": null,
"tax_total": "4.00 USD",
"total": "24.00 USD",
"updated_at": Any<Date>,
}
```
</details>
### Order Shipment Created
**Key in plugin options:** `order_shipped_template`
**Description:** Template to be sent to the customer when a shipment of their order has been created.
<details>
<summary>Example Data</summary>
```json noReport
{
"date": Any<String>,
"email": "test@testson.com",
"fulfillment": Object {
"canceled_at": null,
"claim_order_id": null,
"created_at": Any<Date>,
"data": Object {},
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"fulfillment_id": Any<String>,
"item_id": "test-item",
"quantity": 2,
},
],
"metadata": Object {},
"no_notification": null,
"order_id": Any<String>,
"provider_id": "test-ful",
"shipped_at": Any<Date>,
"swap_id": null,
"tracking_links": Array [],
"tracking_numbers": Array [],
"updated_at": Any<Date>,
},
"locale": null,
"order": Object {
"beforeInsert": [Function],
"billing_address": null,
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"claims": Array [],
"created_at": Any<Date>,
"currency_code": "usd",
"customer": Object {
"billing_address_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"email": "test@testson.com",
"first_name": null,
"has_account": false,
"id": Any<String>,
"last_name": null,
"metadata": null,
"phone": null,
"updated_at": Any<Date>,
},
"customer_id": Any<String>,
"discount_total": 0,
"discounts": Array [],
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "shipped",
"fulfillments": Array [
Object {
"canceled_at": null,
"claim_order_id": null,
"created_at": Any<Date>,
"data": Object {},
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"fulfillment_id": Any<String>,
"item_id": "test-item",
"quantity": 2,
},
],
"metadata": Object {},
"no_notification": null,
"order_id": Any<String>,
"provider_id": "test-ful",
"shipped_at": Any<Date>,
"swap_id": null,
"tracking_numbers": Array [],
"updated_at": Any<Date>,
},
],
"gift_card_total": 0,
"gift_card_transactions": Array [],
"gift_cards": Array [],
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": "test-item",
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"payments": Array [],
"refundable_amount": 0,
"refunded_total": 0,
"refunds": Array [],
"region": Object {
"automatic_taxes": true,
"created_at": Any<Date>,
"currency_code": "usd",
"deleted_at": null,
"fulfillment_providers": Array [],
"gift_cards_taxable": true,
"id": "test-region",
"metadata": null,
"name": "Test region",
"payment_providers": Array [
PaymentProvider {
"id": "test-pay",
"is_installed": true,
},
],
"tax_code": null,
"tax_provider_id": null,
"tax_rate": 12.5,
"updated_at": Any<Date>,
},
"region_id": "test-region",
"returns": Array [],
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"shipping_methods": Array [
Object {
"cart_id": null,
"claim_order_id": null,
"data": Object {},
"id": Any<String>,
"order_id": Any<String>,
"price": 0,
"return_id": null,
"shipping_option": Object {
"admin_only": false,
"amount": 500,
"created_at": Any<Date>,
"data": Object {},
"deleted_at": null,
"id": Any<String>,
"is_return": false,
"metadata": null,
"name": "free",
"price_type": "flat_rate",
"profile_id": Any<String>,
"provider_id": "test-ful",
"region_id": "test-region",
"updated_at": Any<Date>,
},
"shipping_option_id": Any<String>,
"swap_id": null,
"tax_lines": Array [],
},
],
"shipping_total": 0,
"status": "pending",
"subtotal": 2000,
"swaps": Array [],
"tax_rate": null,
"tax_total": 400,
"total": 2400,
"updated_at": Any<Date>,
},
"tracking_links": Array [],
"tracking_number": "",
}
```
</details>
### Order Return Requested
**Key in plugin options:** `order_return_requested_template`
**Description:** Template to be sent to the customer when a return request is made for an order.
<details>
<summary>Example Data</summary>
```json noReport
{
"date": Any<String>,
"email": "test@testson.com",
"has_shipping": false,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"price": "12.00 USD",
"quantity": 1,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Intelligent Plastic Chips",
"totals": Object {
"discount_total": 0,
"gift_card_total": 0,
"original_tax_total": 200,
"original_total": 1200,
"quantity": 1,
"subtotal": 1000,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"tax_total": 200,
"total": 1200,
"unit_price": 1000,
},
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"locale": null,
"order": Object {
"beforeInsert": [Function],
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"claims": Array [],
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"discounts": Array [],
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"gift_card_transactions": Array [],
"gift_cards": Array [],
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"refunds": Array [],
"region": Object {
"automatic_taxes": true,
"created_at": Any<Date>,
"currency_code": "usd",
"deleted_at": null,
"fulfillment_providers": Array [],
"gift_cards_taxable": true,
"id": Any<String>,
"metadata": null,
"name": "Test region",
"payment_providers": Array [
PaymentProvider {
"id": "test-pay",
"is_installed": true,
},
],
"tax_code": null,
"tax_provider_id": null,
"tax_rate": 12.5,
"updated_at": Any<Date>,
},
"region_id": "test-region",
"returns": Array [
Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": Any<String>,
"items": Array [
Object {
"is_requested": true,
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"received_at": null,
"refund_amount": 1200,
"shipping_data": null,
"status": "requested",
"swap_id": null,
"updated_at": Any<Date>,
},
],
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"shipping_methods": Array [],
"status": "pending",
"swaps": Array [],
"tax_rate": null,
"total": 2400,
"updated_at": Any<Date>,
},
"refund_amount": "12.00 USD",
"return_request": Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": Any<String>,
"items": Array [
Object {
"is_requested": true,
"item": Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"received_at": null,
"refund_amount": "12.00 USD",
"shipping_data": null,
"shipping_method": null,
"status": "requested",
"swap_id": null,
"updated_at": Any<Date>,
},
"shipping_total": "0.00 USD",
"subtotal": "12.00 USD",
}
```
</details>
### Order Items Returned
**Key in plugin options:** `order_items_returned_template`
**Description:** Template to be sent to the customer when an orders items have been returned.
<details>
<summary>Example Data</summary>
```json noReport
{
"date": Any<String>,
"email": "test@testson.com",
"has_shipping": false,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"price": "12.00 USD",
"quantity": 1,
"returned_quantity": 1,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Intelligent Plastic Chips",
"totals": Object {
"discount_total": 0,
"gift_card_total": 0,
"original_tax_total": 200,
"original_total": 1200,
"quantity": 1,
"subtotal": 1000,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"tax_total": 200,
"total": 1200,
"unit_price": 1000,
},
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 11,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"locale": null,
"order": Object {
"beforeInsert": [Function],
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"claims": Array [],
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"discounts": Array [],
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "requires_action",
"gift_card_transactions": Array [],
"gift_cards": Array [],
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": 1,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 11,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"refunds": Array [],
"region": Object {
"automatic_taxes": true,
"created_at": Any<Date>,
"currency_code": "usd",
"deleted_at": null,
"fulfillment_providers": Array [],
"gift_cards_taxable": true,
"id": Any<String>,
"metadata": null,
"name": "Test region",
"payment_providers": Array [
PaymentProvider {
"id": "test-pay",
"is_installed": true,
},
],
"tax_code": null,
"tax_provider_id": null,
"tax_rate": 12.5,
"updated_at": Any<Date>,
},
"region_id": "test-region",
"returns": Array [
Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": Any<String>,
"items": Array [
Object {
"is_requested": true,
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"received_at": Any<Date>,
"refund_amount": 1200,
"shipping_data": null,
"status": "received",
"swap_id": null,
"updated_at": Any<Date>,
},
],
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"shipping_methods": Array [],
"status": "pending",
"swaps": Array [],
"tax_rate": null,
"total": 2400,
"updated_at": Any<Date>,
},
"refund_amount": "12.00 USD",
"return_request": Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": Any<String>,
"items": Array [
Object {
"is_requested": true,
"item": Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": 1,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 11,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"received_at": Any<Date>,
"refund_amount": "12.00 USD",
"shipping_data": null,
"shipping_method": null,
"status": "received",
"swap_id": null,
"updated_at": Any<Date>,
},
"shipping_total": "0.00 USD",
"subtotal": "12.00 USD",
}
```
</details>
### Claim Shipment Created
**Key in plugin options:** `claim_shipment_created_template`
**Description:** Template to be sent to the customer when a Claim shipment has been created.
<details>
<summary>Example Data</summary>
```json noReport
{
"claim": Object {
"canceled_at": null,
"created_at": Any<Date>,
"deleted_at": null,
"fulfillment_status": "shipped",
"id": Any<String>,
"idempotency_key": Any<String>,
"metadata": null,
"no_notification": null,
"order": Object {
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"region_id": "test-region",
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"status": "pending",
"tax_rate": null,
"updated_at": Any<Date>,
},
"order_id": Any<String>,
"payment_status": "na",
"refund_amount": null,
"shipping_address_id": Any<String>,
"type": "replace",
"updated_at": Any<Date>,
},
"email": "test@testson.com",
"fulfillment": Object {
"canceled_at": null,
"claim_order_id": Any<String>,
"created_at": Any<Date>,
"data": Object {},
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"fulfillment_id": Any<String>,
"item_id": Any<String>,
"quantity": 1,
},
],
"metadata": Object {},
"no_notification": null,
"order_id": null,
"provider_id": "test-ful",
"shipped_at": Any<Date>,
"swap_id": null,
"tracking_links": Array [],
"tracking_numbers": Array [],
"updated_at": Any<Date>,
},
"locale": null,
"order": Object {
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"region_id": "test-region",
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"status": "pending",
"tax_rate": null,
"updated_at": Any<Date>,
},
"tracking_links": Array [],
"tracking_number": "",
}
```
</details>
### Swap Created
**Key in plugin options:** `swap_created_template`
**Description:** Template to be sent to the customer when a swap for an order has been created.
<details>
<summary>Example Data</summary>
```json noReport
{
"locale": null,
"swap": Object {
"additional_items": Array [
Object {
"allow_discounts": true,
"cart_id": Any<String>,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "Small Wooden Computer",
"fulfilled_quantity": 1,
"has_shipping": true,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": Object {},
"order_id": null,
"quantity": 1,
"returned_quantity": null,
"shipped_quantity": 1,
"should_merge": true,
"swap_id": Any<String>,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": Any<String>,
"metadata": null,
"name": "default",
"rate": 12.5,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Awesome Metal Ball",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "variant-2",
"inventory_quantity": 9,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Small Wooden Computer",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "variant-2",
},
],
"return_order": Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"is_requested": true,
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": null,
"received_at": null,
"refund_amount": 1200,
"shipping_data": null,
"status": "requested",
"swap_id": Any<String>,
"updated_at": Any<Date>,
},
"allow_backorder": true,
"canceled_at": null,
"cart_id": Any<String>,
"confirmed_at": Any<Date>,
"created_at": Any<Date>,
"deleted_at": null,
"difference_due": 488,
"fulfillment_status": "shipped",
"id": Any<String>,
"idempotency_key": Any<String>,
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"payment_status": "awaiting",
"shipping_address_id": Any<String>,
"updated_at": Any<Date>,
},
"order": Object {
"discounts": Array [],
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"region_id": "test-region",
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"status": "pending",
"tax_rate": null,
"updated_at": Any<Date>,
"swaps": Array [],
},
"return_request": Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": Any<String>,
"items": Array [
Object {
"is_requested": true,
"item": Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": 1,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 11,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"received_at": Any<Date>,
"refund_amount": "12.00 USD",
"shipping_data": null,
"shipping_method": null,
"status": "received",
"swap_id": null,
"updated_at": Any<Date>,
},
"date": Any<String>,
"swapLink": Any<String>,
"email": "test@testson.com",
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"discounted_price": "12.00 USD",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": "test-item",
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"price": "12.00 USD",
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Intelligent Plastic Chips",
"totals": Object {
"discount_total": 0,
"gift_card_total": 0,
"original_tax_total": 400,
"original_total": 2400,
"quantity": 2,
"subtotal": 2000,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"tax_total": 400,
"total": 2400,
"unit_price": 1000,
},
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"return_items": Array[...], //same as items
"return_total": "12.00 USD",
"refund_amount": "12.00 USD",
"additional_total": "11.25 USD"
}
```
</details>
### Swap Shipment Created
**Key in plugin options:** `swap_shipment_created_template`
**Description:** Template to be sent to the customer when a shipment of a swap of an order has been created.
<details>
<summary>Example Data</summary>
```json noReport
Object {
"additional_total": "16.88 USD",
"date": Any<String>,
"email": "test@testson.com",
"fulfillment": Object {
"canceled_at": null,
"claim_order_id": null,
"created_at": Any<Date>,
"data": Object {},
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"fulfillment_id": Any<String>,
"item_id": Any<String>,
"quantity": 1,
},
],
"metadata": Object {},
"no_notification": null,
"order_id": null,
"provider_id": "test-ful",
"shipped_at": Any<Date>,
"swap_id": Any<String>,
"tracking_links": Array [],
"tracking_numbers": Array [],
"updated_at": Any<Date>,
},
"items": Array [
Object {
"allow_discounts": true,
"cart_id": Any<String>,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "Small Wooden Computer",
"discounted_price": "11.25 USD",
"fulfilled_quantity": 1,
"has_shipping": true,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": Object {},
"order_id": null,
"price": "11.25 USD",
"quantity": 1,
"returned_quantity": null,
"shipped_quantity": 1,
"should_merge": true,
"swap_id": Any<String>,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": Any<String>,
"metadata": null,
"name": "default",
"rate": 12.5,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Awesome Metal Ball",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "variant-2",
"inventory_quantity": 9,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Small Wooden Computer",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "variant-2",
},
],
"locale": null,
"order": Object {
"beforeInsert": [Function],
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"discounts": Array [],
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": Any<String>,
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 9,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"region": Object {
"automatic_taxes": true,
"created_at": Any<Date>,
"currency_code": "usd",
"deleted_at": null,
"fulfillment_providers": Array [],
"gift_cards_taxable": true,
"id": Any<String>,
"metadata": null,
"name": "Test region",
"payment_providers": Array [
PaymentProvider {
"id": "test-pay",
"is_installed": true,
},
],
"tax_code": null,
"tax_provider_id": null,
"tax_rate": 12.5,
"updated_at": Any<Date>,
},
"region_id": "test-region",
"shipping_address_id": Any<String>,
"status": "pending",
"swaps": Array [
Object {
"additional_items": Array [
Object {
"allow_discounts": true,
"cart_id": Any<String>,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "Small Wooden Computer",
"fulfilled_quantity": 1,
"has_shipping": true,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": Object {},
"order_id": null,
"quantity": 1,
"returned_quantity": null,
"shipped_quantity": 1,
"should_merge": true,
"swap_id": Any<String>,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": Any<String>,
"metadata": null,
"name": "default",
"rate": 12.5,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Awesome Metal Ball",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "variant-2",
"inventory_quantity": 9,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Small Wooden Computer",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "variant-2",
},
],
"allow_backorder": true,
"canceled_at": null,
"cart_id": Any<String>,
"confirmed_at": Any<Date>,
"created_at": Any<Date>,
"deleted_at": null,
"difference_due": 488,
"fulfillment_status": "shipped",
"id": Any<String>,
"idempotency_key": Any<String>,
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"payment_status": "awaiting",
"shipping_address_id": Any<String>,
"updated_at": Any<Date>,
},
],
"tax_rate": null,
"updated_at": Any<Date>,
},
"paid_total": "4.88 USD",
"refund_amount": "12.00 USD",
"return_total": "12.00 USD",
"swap": Object {
"additional_items": Array [
Object {
"allow_discounts": true,
"cart_id": Any<String>,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "Small Wooden Computer",
"fulfilled_quantity": 1,
"has_shipping": true,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": Object {},
"order_id": null,
"quantity": 1,
"returned_quantity": null,
"shipped_quantity": 1,
"should_merge": true,
"swap_id": Any<String>,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": Any<String>,
"metadata": null,
"name": "default",
"rate": 12.5,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Awesome Metal Ball",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "variant-2",
"inventory_quantity": 9,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Small Wooden Computer",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "variant-2",
},
],
"allow_backorder": true,
"beforeInsert": [Function],
"canceled_at": null,
"cart_id": Any<String>,
"confirmed_at": Any<Date>,
"created_at": Any<Date>,
"deleted_at": null,
"difference_due": 488,
"fulfillment_status": "shipped",
"id": Any<String>,
"idempotency_key": Any<String>,
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"payment_status": "awaiting",
"return_order": Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"is_requested": true,
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": null,
"received_at": null,
"refund_amount": 1200,
"shipping_data": null,
"status": "requested",
"swap_id": Any<String>,
"updated_at": Any<Date>,
},
"shipping_address": Object {
"address_1": "121 W Something St",
"address_2": null,
"city": "ville la something",
"company": null,
"country_code": null,
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": null,
"id": Any<String>,
"last_name": null,
"metadata": null,
"phone": "12353245",
"postal_code": "1234",
"province": "something",
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"shipping_methods": Array [
Object {
"cart_id": Any<String>,
"claim_order_id": null,
"data": Object {},
"id": Any<String>,
"order_id": null,
"price": 500,
"return_id": null,
"shipping_option": Object {
"admin_only": false,
"amount": 500,
"created_at": Any<Date>,
"data": Object {},
"deleted_at": null,
"id": Any<String>,
"is_return": false,
"metadata": null,
"name": "Test Method",
"price_type": "flat_rate",
"profile_id": Any<String>,
"provider_id": "test-ful",
"region_id": "test-region",
"updated_at": Any<Date>,
},
"shipping_option_id": Any<String>,
"swap_id": Any<String>,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"metadata": null,
"name": "default",
"rate": 12.5,
"shipping_method_id": Any<String>,
"updated_at": Any<Date>,
},
],
},
],
"updated_at": Any<Date>,
},
"tax_amount": "-0.12 USD",
"tracking_links": Array [],
"tracking_number": "",
}
```
</details>
### Swap Received
**Key in plugin options:** `swap_received_template`
**Description:** Template to be sent to the customer when a swap of an order has been received.
<details>
<summary>Example Data</summary>
```json noReport
{
"locale": null,
"swap": Object {
"additional_items": Array [
Object {
"allow_discounts": true,
"cart_id": Any<String>,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "Small Wooden Computer",
"fulfilled_quantity": 1,
"has_shipping": true,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": Object {},
"order_id": null,
"quantity": 1,
"returned_quantity": null,
"shipped_quantity": 1,
"should_merge": true,
"swap_id": Any<String>,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": Any<String>,
"metadata": null,
"name": "default",
"rate": 12.5,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Awesome Metal Ball",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "variant-2",
"inventory_quantity": 9,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Small Wooden Computer",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "variant-2",
},
],
"return_order": Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"is_requested": true,
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": null,
"received_at": null,
"refund_amount": 1200,
"shipping_data": null,
"status": "requested",
"swap_id": Any<String>,
"updated_at": Any<Date>,
},
"allow_backorder": true,
"canceled_at": null,
"cart_id": Any<String>,
"confirmed_at": Any<Date>,
"created_at": Any<Date>,
"deleted_at": null,
"difference_due": 488,
"fulfillment_status": "shipped",
"id": Any<String>,
"idempotency_key": Any<String>,
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"payment_status": "awaiting",
"shipping_address_id": Any<String>,
"updated_at": Any<Date>,
},
"order": Object {
"discounts": Array [],
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"region_id": "test-region",
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"status": "pending",
"tax_rate": null,
"updated_at": Any<Date>,
"swaps": Array [],
},
"return_request": Object {
"claim_order_id": null,
"created_at": Any<Date>,
"id": Any<String>,
"idempotency_key": Any<String>,
"items": Array [
Object {
"is_requested": true,
"item": Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": 1,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 11,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
"item_id": "test-item",
"metadata": null,
"note": null,
"quantity": 1,
"reason_id": null,
"received_quantity": null,
"requested_quantity": 1,
"return_id": Any<String>,
},
],
"metadata": null,
"no_notification": null,
"order_id": Any<String>,
"received_at": Any<Date>,
"refund_amount": "12.00 USD",
"shipping_data": null,
"shipping_method": null,
"status": "received",
"swap_id": null,
"updated_at": Any<Date>,
},
"date": Any<String>,
"swapLink": Any<String>,
"email": "test@testson.com",
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"discounted_price": "12.00 USD",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": "test-item",
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"price": "12.00 USD",
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"thumbnail": null,
"title": "Intelligent Plastic Chips",
"totals": Object {
"discount_total": 0,
"gift_card_total": 0,
"original_tax_total": 400,
"original_total": 2400,
"quantity": 2,
"subtotal": 2000,
"tax_lines": Array [
Object {
"code": "default",
"created_at": Any<Date>,
"id": Any<String>,
"item_id": "test-item",
"metadata": null,
"name": "default",
"rate": 20,
"updated_at": Any<Date>,
},
],
"tax_total": 400,
"total": 2400,
"unit_price": 1000,
},
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"return_items": Array[...], //same as items
"return_total": "12.00 USD",
"tax_total": "4.00 USD",
"refund_amount": "12.00 USD",
"additional_total": "11.25 USD"
}
```
</details>
### Gift Card Created
**Key in plugin options:** `gift_card_created_template`
**Description:** Template to be to the customer sent when a gift card in their order has been created.
<details>
<summary>Example Data</summary>
```json noReport
Object {
"code": Any<String>,
"value": 100,
"balance": 100,
"display_value": "100.00",
"region": Object {
"automatic_taxes": true,
"created_at": Any<Date>,
"currency_code": "usd",
"deleted_at": null,
"fulfillment_providers": Array [],
"gift_cards_taxable": true,
"id": Any<String>,
"metadata": null,
"name": "Test region",
"payment_providers": Array [
PaymentProvider {
"id": "test-pay",
"is_installed": true,
},
],
"tax_code": null,
"tax_provider_id": null,
"tax_rate": 12.5,
"updated_at": Any<Date>,
},
"region_id": "test-region",
"order": Object {
"billing_address_id": null,
"canceled_at": null,
"cart_id": null,
"created_at": Any<Date>,
"currency_code": "usd",
"customer_id": Any<String>,
"display_id": Any<Number>,
"draft_order_id": null,
"email": "test@testson.com",
"external_id": null,
"fulfillment_status": "fulfilled",
"id": Any<String>,
"idempotency_key": null,
"items": Array [
Object {
"allow_discounts": true,
"cart_id": null,
"claim_order_id": null,
"created_at": Any<Date>,
"description": "",
"fulfilled_quantity": 2,
"has_shipping": null,
"id": Any<String>,
"is_giftcard": false,
"is_return": false,
"metadata": null,
"order_id": Any<String>,
"quantity": 2,
"returned_quantity": null,
"shipped_quantity": 2,
"should_merge": true,
"swap_id": null,
"thumbnail": "",
"title": "Intelligent Plastic Chips",
"unit_price": 1000,
"updated_at": Any<Date>,
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
},
],
"metadata": null,
"no_notification": null,
"object": "order",
"payment_status": "captured",
"region_id": "test-region",
"shipping_address": Object {
"address_1": "84185 Lindsey Centers",
"address_2": null,
"city": null,
"company": null,
"country_code": "us",
"created_at": Any<Date>,
"customer_id": null,
"deleted_at": null,
"first_name": "Chyna",
"id": Any<String>,
"last_name": "Osinski",
"metadata": null,
"phone": null,
"postal_code": "51510",
"province": null,
"updated_at": Any<Date>,
},
"shipping_address_id": Any<String>,
"status": "pending",
"tax_rate": null,
"updated_at": Any<Date>,
},
"order_id": Any<String>,
"is_disabled": false,
"created_at": Any<Date>,
"updated_at": Any<Date>,
"deleted_at": null,
"locale": null,
"email": "test@testson.com",
"display_value": 4
}
```
</details>
### Customer Password Reset
**Key in plugin options:** `customer_password_reset_template`
**Description:** Template to be sent to the customer when they request a password reset.
<details>
<summary>Example Data</summary>
```json noReport
Object {
"id": Any<String>,
"email": "test@testson.com",
"first_name": "Chyna",
"last_name": "Osinski",
"token": Any<String>,
}
```
</details>
### User Password Reset
**Key in plugin options:** `user_password_reset_template`
**Description:** Template to be sent to the admin user when they request a password reset.
<details>
<summary>Example Data</summary>
```json noReport
Object {
"email": "test@testson.com",
"token": Any<String>,
}
```
</details>
### Restock Notification
**Key in plugin options:** medusa_restock_template
**Description:** Template to be sent to admin users when a product has hit the restock quantity threshold.
<details>
<summary>Example Data</summary>
```json noReport
Object {
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": "",
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant": Object {
"allow_backorder": false,
"barcode": null,
"created_at": Any<Date>,
"deleted_at": null,
"ean": null,
"height": null,
"hs_code": null,
"id": "test-variant",
"inventory_quantity": 10,
"length": null,
"manage_inventory": true,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"product": Object {
"collection_id": null,
"created_at": Any<Date>,
"deleted_at": null,
"description": null,
"discountable": true,
"external_id": null,
"handle": null,
"height": null,
"hs_code": null,
"id": "test-product",
"is_giftcard": false,
"length": null,
"material": null,
"metadata": null,
"mid_code": null,
"origin_country": null,
"profile_id": Any<String>,
"status": "draft",
"subtitle": null,
"thumbnail": null,
"title": "Awesome Metal Ball",
"type_id": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"product_id": "test-product",
"sku": null,
"title": "Practical Granite Pizza",
"upc": null,
"updated_at": Any<Date>,
"weight": null,
"width": null,
},
"variant_id": "test-variant",
"emails": Array [
"test@testson.com"
]
}
```
</details>
---
## Install the SendGrid Plugin
In the directory of your Medusa backend run the following command to install the SendGrid plugin:
```bash npm2yarn
npm install medusa-plugin-sendgrid
```
Then, in your `.env` file add the API key you created earlier as well as the send from email:
```bash
SENDGRID_API_KEY=<API_KEY>
SENDGRID_FROM=<SEND_FROM_EMAIL>
```
Make sure to replace the `<API_KEY>` with the SendGrid API key and the `<SEND_FROM_EMAIL>` with the email youre using in SendGrid as the single sender.
Also, you should add the ID of each template you create in `.env` as well. For example:
```bash
SENDGRID_ORDER_PLACED_ID=<ORDER_PLACED_TEMPLATE_ID>
```
Where `<ORDER_PLACED_TEMPLATE_ID` is the ID of your template for order placed emails.
Finally, in your `medusa-config.js` file, add the SendGrid plugin into the array of plugins:
```jsx title=medusa-config.js
const plugins = [
// ...,
{
resolve: `medusa-plugin-sendgrid`,
options: {
api_key: process.env.SENDGRID_API_KEY,
from: process.env.SENDGRID_FROM,
order_placed_template:
process.env.SENDGRID_ORDER_PLACED_ID,
localization: {
"de-DE": { // locale key
order_placed_template:
process.env.SENDGRID_ORDER_PLACED_ID_LOCALIZED,
},
},
},
},
]
```
The `api_key` and `from` options are required. Then, use the key of each template you create (from the [reference](#template-reference)) as the option name with the template ID as the value.
You can also optionally pass the option `localization` if you want to support different languages. `localization` accepts an object that has the country and language codes as keys. The value for each code should be an object of template keys and their IDs as values. Make sure to include the localized template IDs in `.env` as well.
---
## Test it Out
Run your backend now:
```bash npm2yarn
npm run start
```
To test it out, perform an action that would trigger one of the emails being sent. For example, you can use your Medusa storefront to create an order. An email from your SendGrid account will be sent to the customer email.
:::tip
If you dont have a storefront installed, check out the [Next.js](../../starters/nextjs-medusa-starter.mdx) starter storefront.
:::
You can also track analytics related to emails sent from the SendGrid dashboard.
![SendGrid Analytics](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000788/Medusa%20Docs/SendGrid/X01LigH_mxmtbn.png)
---
## See Also
- [Notifications Overview](../../development/notification/overview.mdx)
- Install the [Medusa admin](../../admin/quickstart.mdx) for functionalities like Gift Cards creation, swaps, claims, order return requests, and more.