Notifications

(ms.notifications)

It is used to send different types of notifications like email, SMS, push and browser notifications.



Fields

ValueDescription
name   
Type: string
Required
The name of the notification.
display_name   
Type: string
The name of the notification displayed on admin panel.
description   
Type: string
A brief description about when the notification will be used.
group   
Type: string
It describes the group set of notification. There are three groups for notifications:
  • Order
  • Shipping
  • User
type   
Type: object
The array of object is used to define the type of notification that you want to send. There are four types of notifications:
  • Email
  • SMS
  • Push
  • Browser
email
Type: string
Select the flag, if you want to define the email notification.
sms
Type: string
Select the flag, if you want to define the SMS notification.
push
Type: string
Select the flag, if you want to define the push notification.
browser
Type: string
Select the flag, if you want to define the browser notification.
email   
Type: object
It is an object containing information about email and its header.
{
from_email: "fanny@gmail.com";
cc: ['vijmaisel@gmail.com','mayfair@gmail.com'];
subject: "Order Confirmation";
message: "Your Order with OrderId 504 is confirmed"
}
from_email
Type: string
It contains the email id of the sender.
to_email
Type: string
It contains the email id of the receiver.
cc
Type: array
It contains emails to be kept in cc.
bcc
Type: array
It contains emails to be kept in bcc.
subject
Type: string
It contains the subject of the email.
attachment
Type: string
It contains the link of the attachment that is to be sent along with the email.
variables
Type: custom
It contains the global variables that are used for creating the email template.
message
Type: custom
It contains the message to be send in the email.
sms   
Type: object
It is an object containing information about the SMS notification.
variables
Type: custom
It contains the global variables that are used for creating the sms template.
custom_variables
Type: custom
It contains the custom variables that are used for creating the sms template.
message
Type: string
It contains the message to be send in the sms.
type
Type: string
original_message
Type: string
push   
Type: object
It is an object containing information about the push notification.
title
Type: string
It contains the title of the push notification.
message
Type: string
It contains the message to be send in the push notification.
image
Type: string
It contains the URL of the image in the push notification.
summary
Type: string
It contains the summary text that is shown when the push notification is collapsed.
picture
Type: string
url
Type: string
It contains the landing URL on which the user is redirected when he clicks on the push notification.
browser   
Type: object
It is an object containing information about the browser notification.
title
Type: string
It contains the title of the notification.
landing_url
Type: string
It contains the landing URL on which the user is redirected when he clicks on the browser notification.
message
Type: string
It contains the message to be send in the browser notification.
icon_url
Type: string
It contains the URL of notification icon.
resolve   
Type: array
It is used to resolve the data from notification variable inside the notification itself.
entity
Type: string
Required
It contains the entity from which data is needed to be resolved.
field
Type: string
Required
It contains the field of which data is to be resolved.
resolved_field
Type: string
Required
It contains the field in which resolved data will be stored.
columns
Type: array
Required
It contains the columns that are required in the resolved data.

Commands (Endpoints)

POST /api/1/entity/ms.notifications   
Creates a new notification
DEL /api/1/entity/ms.notifications/{resource_id}   
Deletes a notification
PUT /api/1/entity/ms.notifications/{resource_id}   
Updates an existing notification
GET /api/1/entity/ms.notifications/{resource_id}   
Retrieves a single notification
GET /api/1/entity/ms.notifications   
Retrieves a list of notifications