Email

An email notification is an email sent to either the Merchants or the Consumers when any of them has taken an action. Some examples include:

An email notification sent to the Merchant when Consumer has completed a purchase

An email notification sent to the Consumer once they have onboarded on the marketplace


Important things to know before using any of these APIs:

For everyone: 

  • languageCode = en. Always.

For HTML coders: 

  • Use " " in your code instead of “ ”.
  • When writing HTML, don’t forget to wrap your whole <body> in inverted commas
    "<body>...</body>"
  • When writing HTML as parameter, you just need to remember the above. When a response returns HTML data, however,
        - New lines will be represented by “ \n ” or “ \r ”
        - Tabs will be represented by “ \t ”.
        - Inverted commas in will be represented by “ \" ”

How to see the actual content of any template

  1. Refer to the table below
  2. Choose the templateID you want to check
  3. Use it as parameter in the “Get email template content by ID” API.
  4. Copy the contents of “Content” in the response.
  5. Replace all the “&lt;” with “<”, and “&gt;” with “>”.
  6. Paste it in the “Body” parameter of the “Send email” API.
  7. Send it to your own email.
  8. Check it.

Example of how you’d fully customise an email-template

  1. Decide the Template to customise. E.g: “Welcome Mail”, templateID = 1
  2. Check the default content of the template using the “Get email Template Content by ID”.
  3. Response:
     "ID": 1,
     "Name": "Welcome Mail",
     "CustomisedContent": {
       "IsEnabled": false,
       "LanguageCode": "en",
       "Sender": "{{AdminEmail}}",
       "Subject": "Welcome to {{Marketname}}",
       "Content": "&lt;body&gt;\n . .(the default content). . &lt;/body&gt;\n"
     }

    Find all &lt; Replace with <
    Find all &gt; Replace with >

  4. Copy the contents of "Content" to a text editor. Using the Find & Replace tool, 

    "<body>\n

    <div style=\"background-color=#5e5e5e;\">\n

    <p>Example</p>\n

    </div>\n

    </body>" (If you’re going to use dynamic parameters, make sure to read step 7 properly.) 

  5. Copy your customised contents to the “Content” param of “Edit Email Content” API.
    Changes to the recipients and sender can also be done in this API.
    Example:

     "IsEnabled": true,
     "languageCode": "en",
     "Sender": "tanoo_joy@email.com",
     "BCC": "sherz@emailtwo.com",
     "CC": "shers@emailthree.com",
     "Subject": "$10",
     "Content": "

    <body>\n

    <div style=\"background-color=#5e5e5e;\">\n

    <p>Example</p>\n

    </div>\n

    </body> ".

  6. If no syntax error was made, the “Get Email Template Content by ID” will show your changes. The only changes will be that "<" and ">" will be replaced by "&lt;" and "&gt;" which is normal.

  7. If you added dynamic parameters that are not the default one for that template, then you will need to use the “Get Customised Email Content” to add it to the default ones.
    Example: {{SellerName}} is added in the “Contents” of the email.

     "TemplateName": "welcomemail",
     "LanguageCode": "en",
     "DynamicValues": {
      "AdminEmail": "tanoo_joy@email.com",
      "Marketname": "Sherz",
      "Logo": "sherz.sandbox.arcadier.io/images/logo-sherz.sandbox.arcadier.io.png",
      "ConsumerFirstName": "Tanoo",
      "ConsumerLastName": "Joy",
      "ConsumerEmail": "tanoojoy@gmail.com",
      "MarketplaceUrl": "sherz.sandbox.arcadier.io"

      "SellerName": "Chris Evans"
      },
     "Recipients": [
       "tanoo_joy@emailtwo.com"
     ]

  8.  Done.



Template

templateID

templateName

Welcome Mail

1

welcomemail

Start Selling

2

startselling

Account Suspended

3

accountsuspended

Change of Payment

4

changeofpayment

Reset Password

5

resetpassword

New Order

6

neworder

Received Order

7

receivedorder

Order Pickup

8

orderpickup

Order Shipped

9

ordershipped

Acknowledged Order (Bespoke only)

10

acknowledgedorder

Review Prompt

11

reviewprompt

Offer from Seller (Spacetime only)


12

offerfromseller

Offer Declined (Spacetime only)


13

offerdeclined

Seller Invite

14

sellerinvite

Buyer Invite

15

buyerinvite

Enquiry from buyer (Spacetime only)

16

enquiryfrombuyer

Message from seller

17

messagefromseller

Message from buyer

18

messagefrombuyer



Bespoke Email Template Default Parameters

Template

Default Parameters

Welcome Mail

"Logo", "ConsumerFirstName", "ConsumerLastName", "ConsumerEmail", "MarketplaceUrl", "Marketname"

Start Selling

"Logo": , "SellerName": , "MarketplaceUrl"”: , "Marketname":

Account Suspended

"MarketplaceUrl": , "Marketname": , "AdminContact": , "SupportEmail": , "SellerName": , "Logo":

Change of Payment

"Logo": , "SellerName": , "ReturnUrl": , "Marketname": ,

Reset Password

"Logo": , "Marketname": , "ReturnUrl":,

New Order

"Logo": , "SellerName": , "ConsumerFirstName": , "OrderID": , "InvoiceNo": , "Timestamp": , "OrderItemsString": , "DeliveryAddress": , "CurrencyCode": , "Subtotal": , "ShippingCost": , "BulkDeliveryCost": , "Total": , "Paid": , "ToBeCollected": , "OrderHistoryURL": , "ConsumerContact": , "ConsumerEmail}"Marketname": , "MarketplaceUrl":

Received Order

"Logo": , "ConsumerFirstName": , "SupportEmail": , "InvoiceNo": , "Timestamp": , "OrderItemsString": , "DeliveryAddress": , "CurrencyCode": , "Subtotal": , "ShippingCost": , "BulkDeliveryCost": , "Total": , "Paid": , "ToBeCollected": , "OrderHistoryURL": , "Marketname":

Order Pickup

"Logo": , "ConsumerFirstName": , "InvoiceNo": , "Timestamp": , "ImageUrl": , "ItemName": , "Quantity": , "Variants": , "CurrencyCode": , "ItemSubtotal": , "DeliveryMethodName": , "ConsumerEmail": , "SupportEmail": , "Marketname": , "MarketplaceUrl": ,

Order Shipped

"Logo": , "ConsumerFirstName": , "InvoiceNo": , "Timestamp": , "ImageUrl": , "ItemName": , "Quantity": , "Variants": , "DeliveryMethodName": , "DeliveryMethod": , "ConsumerEmail": , "DeliveryAddress": , "Marketname": , "MarketplaceUrl": ,

Acknowledged Order

"Logo": , "ConsumerFirstName": , "SupportEmail": , "Marketname": ,

Review Prompt

"Logo": , "ConsumerFirstName": , "ReviewPromptItemsString": , "MarketplaceUrl": , "InvoiceNo": , "Marketname": , "MarketplaceUrl": ,

Seller Invite

"Logo": , "Marketname": , "ReturnUrl": , "MarketplaceUrl": ,

Buyer Invite

"Logo": , "Marketname": , "ReturnUrl": , "MarketplaceUrl":

Message from seller

"Logo": , "ConsumerFirstName": , "SellerName": , "ReturnUrl": , "Marketname":

Message from buyer

"Logo": , "SellerName": , "ConsumerFirstName": , "ReturnUrl": , "Marketname":



Group ID - Group

Parameters

1 - Marketplace

{{Logo}}, {{MarketDomain}}, {{MarketName}}, {{MarketplaceURL}}

2 - Items

{{AddOns}}, {{ImageURL}}, {{ItemName}}, {{ItemPrice}}, {{ItemPriceUnit}}, {{ItemPriceUnitPlural}}, {{ItemSubTotal}}, {{Variants}}, {{VariantsDetail}}

3 - Admin

{{AdminContact}}, {{AdminEmail}}, {{AdminFullName}}, {{AdminName}}, {{EmailFromDomain}}, {{SupportEmail}}

4 - Order

{{Booking}}, {{BookingEndTime}}, {{CheckinCheckoutHour}}, {{InvoiceNo,}} {{OrderHistoryURL}}, {{OrderID}}, {{OrderItem}}, {{OrderItemsString}}, {{Paid}}, {{Quantity}}, {{ReviewPromptItemsString}}, {{ShowTime}}, {{Timestamp}}, {{ToBeCollected.}}

5 - Pricing

{{BulkDeliveryCost, {{DeliveryPrice}}, {{FreightCost}}, {{ShippingCost}}, {{Subtotal}}, {{Total}}

6 - Consumer

{{ConsumerAddress}}, {{ConsumerContact}}, {{ConsumerEmail}}, {{ConsumerFirstName, {{ConsumerLastNAme}}, {{ConsumerLoginID, {{DeliveryAddress, {{DeliveryMethod}}, {{DeliveryMethodName}}

7 - Merchant

{{SellerEmail}}, {{SellerName}}

8 - General

{{ArcadierURL}}, {{CurrencyCode}}, {{ReturnURL}}



What do you do with Email ?

POST:

Property Table

Email properties

Property Names Property Type Description
ID

Optional

integer

"ID": 1,

The id of the email template

Name

Optional

string

"Name": "Admin"

The name of the email template parameter group

TemplateName

Optional

string

"TemplateName": "Welcome Mail"

The name of the email template

LanguageCode

Optional

string

"LanguageCode": "en"

The language code use for email

Description

Optional

string

"Description": "A welcoming mail to new signup to the marketplace"

The description detail of the email template

Type

Optional

string

"Type": "On boarding"

The type of email template

Recipients

Optional

array[string]

"Recipients": [
"jkerry@gmail.com","blaineJon@hotmail.com"
]

The list of email recipients

IsEnabled

Optional

boolean

"IsEnabled":  true

If value is true, the email notification is enable else if value is false then email notification is disable

Sender

Optional

string

"Sender":  "{{AdminEmail}}"

The sender email address

BCC

Optional

array[string]

"BCC": ["info@sneakerlabs.com"]

The BCC email address

CC

Optional

array[string]

"CC": ["help@sneakerlabs.com"]

The CC email address

Subject

Optional

string

"Subject":  "Welcome to {{Marketplacename}}"

The email subject

Body

Optional

string

"Body": "Hello. Thanks for signing up with our marketplace"

The email body

Content

Optional

string

"Content": " <body>\n <div style=\"max-width:700px; width:100%; margin:0 auto; border:1px solid #ddd; color:#999; font-size:16px; font-family:sans-serif; line-height:25px;\">\n <div style=\"padding:15px;\">\n <div style=\"text-align:center; margin-bottom:50px;\">\n <img src=\"{{Logo}}\" style=\"max-width:200px;\" />\n </div>\n <div style=\"\">\n <p style=\"color:#000; font-weight:bold; margin-bottom:50px;\">Hi {{ConsumerFirstName}} {{ConsumerLastName}},</p>\n <p>Welcome to marketplace! </p>\n <p>We hope that you enjoy shopping at marketplace as much as we enjoy bringing you new content! </p>\n <p>Your login ID is <a style=\"color:#FF5A60; font-weight:bold; text-decoration:none;\" href=\"mailto:{{ConsumerEmail}}\">{{ConsumerEmail}}</a>.</p>\n </div>\n <div style=\"text-align:center; margin-top:100px; margin-bottom:100px\">\n <a href=\"{{MarketplaceUrl}}\" style=\"font-size: 18px; background-color: #FF5A60; text-decoration: none; color: #fff; padding:11.5px 30px; border-radius: 50px; width: 180px; display: inline-block;\">START SHOPPING</a>\n </div>\n <div style=\"margin-bottom:50px;\">\n <p>Regards,<br />{{Marketname}}</p>\n <p><a style=\"color:#FF5A60; font-size:17px; font-weight:bold; text-decoration:none;\" href=\"{{MarketplaceUrl}}\">{{MarketplaceUrl}}</a></p>\n\n </div>\n </div>\n </div>\n</body>\n "

The content of the email

EmailTemplateParameters

Optional

array [ EmailTemplateParameter object]

"EmailTemplateParameters": [
  {
    "ID": 24
    "Name": "AdminContact"
  },
  {
    "ID": 21
    "Name": "AdminEmail"
  },
   {
    "ID": 22
    "Name": "AdminFullName"
  },
   {
    "ID": 23
    "Name": "EmailFromDomain"
  },
]

The list of email template parameters

EmailTemplates

Optional

array [EmailTemplate object]

"EmailTemplates": [
{
  "ID": 1,
  "Name": "Welcome Mail",
  "Description": "Sent automatically to any user that registers on to your marketplace."
},
{
   "ID": 2,
   "Name": "Start Selling",
   "Description": "Sent automatically to any Seller once they completes the seller account setup on your marketplace."
}
]

The list of email template in the marketplace

CustomisedContent

Optional

Customise Content Object

"CustomisedContent": {
"IsEnabled": false,
"LanguageCode": "en",
"Sender": "{{AdminEmail}}",
"Subject": "Welcome to {{Marketname}}",
"Content": " <body>\n <div style=\"max-width:700px; width:100%; margin:0 auto; border:1px solid #ddd; color:#999; font-size:16px; font-family:sans-serif; line-height:25px;\">\n <div style=\"padding:15px;\">\n <div style=\"text-align:center; margin-bottom:50px;\">\n <img src=\"{{Logo}}\" style=\"max-width:200px;\" />\n </div>\n <div style=\"\">\n <p style=\"color:#000; font-weight:bold; margin-bottom:50px;\">Hi {{ConsumerFirstName}} {{ConsumerLastName}},</p>\n <p>Welcome to marketplace! </p>\n <p>We hope that you enjoy shopping at marketplace as much as we enjoy bringing you new content! </p>\n <p>Your login ID is <a style=\"color:#FF5A60; font-weight:bold; text-decoration:none;\" href=\"mailto:{{ConsumerEmail}}\">{{ConsumerEmail}}</a>.</p>\n </div>\n <div style=\"text-align:center; margin-top:100px; margin-bottom:100px\">\n <a href=\"{{MarketplaceUrl}}\" style=\"font-size: 18px; background-color: #FF5A60; text-decoration: none; color: #fff; padding:11.5px 30px; border-radius: 50px; width: 180px; display: inline-block;\">START SHOPPING</a>\n </div>\n <div style=\"margin-bottom:50px;\">\n <p>Regards,<br />{{Marketname}}</p>\n <p><a style=\"color:#FF5A60; font-size:17px; font-weight:bold; text-decoration:none;\" href=\"{{MarketplaceUrl}}\">{{MarketplaceUrl}}</a></p>\n\n </div>\n </div>\n </div>\n</body>\n " }

The email customise content

Email Template properties

Property Names Property Type Description
ID

Optional

integer

"ID": 1,

The id of the email template

Name

Optional

string

"Name": "Welcome Mail"

The email template name

Description

Optional

string

"Description": "Sent automatically to any user that registers on to your marketplace."

The description of the email template

Type

Optional

string

"Type": "bespoke"

If the marketplace is a bespoke one.


"Type": "spacetime"

If the marketplace is a spacetime one.


This property only appears in templates:

  1. Offer from seller (spacetime)

  2. Offer Declined (spacetime)

  3. Acknowledged Order (bespoke)

  4. Enquiry from buyer (spacetime)

Email Template Parameter properties

Property Names Property Type Description
ID

Optional

integer

"ID": 24,

The id of the email template parameter

Name

Optional

string

"Name": "AdminContact"

The name of the email template parameter

Customised Content properties

Property Names Property Type Description
IsEnabled

Optional

boolean

"IsEnabled":  true

If value is true, the email notification is enable else if value is false then email notification is disable

LanguageCode

Optional

string

"LanguageCode": "en"

The language code use for email content

Sender

Optional

string

"Sender":  "{{AdminEmail}}"

The sender email address

BCC

Optional

array[string]

"BCC": ["info@sneakerlabs.com"]

The list of email address for the email blind carbon copy to be send to.

CC

Optional

array[string]

"BCC": ["info@sneakerlabs.com"]

The list of email address for the email blind carbon copy to be send to.

Subject

Optional

string

"Subject":  "Welcome to {{Marketplacename}}"

The email subject

Content

Optional

string

"Content": " \n

\n
\n
\n \n
\n
\n

Hi {{ConsumerFirstName}} {{ConsumerLastName}},

\n

Welcome to marketplace!

\n

We hope that you enjoy shopping at marketplace as much as we enjoy bringing you new content!

\n

Your login ID is {{ConsumerEmail}}.

\n
\n \n
\n

Regards,
{{Marketname}}

\n

{{MarketplaceUrl}}

\n\n
\n
\n
\n\n "

The content of the email

Was this article helpful?
0 out of 0 found this helpful