docs: added send invitation guide (#3994)

* docs: added send invitation guide

* eslint fixes
This commit is contained in:
Shahed Nasser
2023-05-03 12:05:07 +03:00
committed by GitHub
parent d44737c049
commit f8532cb7fd
5 changed files with 205 additions and 12 deletions
@@ -17,10 +17,6 @@ This guide will explain how to create the subscriber and how to use SendGrid to
## Prerequisites
### Medusa Backend
Its assumed you already have the Medusa backend installed. If not, you can either use the [create-medusa-app command](../../../create-medusa-app.mdx) to install different Medusa tools, including the backend, or [install the backend only](../../../development/backend/install.mdx).
### Event Bus Module
The event bus module trigger the event to the listening subscribers. So, its required to have an event bus module installed and configured on your Medusa backend.
@@ -139,7 +135,7 @@ When using this method, youll have to handle the logic of sending the confirm
## Step 3: Handle the Event
The `handleCustomerConfirmation` event receives a `data` object as a parameter. This object is the entire customer object. So, you can find in it fields like `first_name`, `last_name`, `email`, and more.
The `handleCustomerConfirmation` method receives a `data` object as a parameter which is a payload emitted when the event was triggered. This object is the entire customer object. So, you can find in it fields like `first_name`, `last_name`, `email`, and more.
In this method, you should typically send an email to the customer. You can place any content in the email, such as welcoming them to your store or thanking them for registering.