Creating a Notification Template

Create a notification template in your app's dashboard to specify the standard text, placeholders, and recipients of notifications. You can then call the Notify endpoint from your code to trigger sending notifications based on the template you defined.

Accessing notifications in your app's dashboard

  1. In your Wix Studio Workspace, select an app from the Custom Apps page .

  2. In your app's dashboard, click Extensions to open the Extensions page.

  3. Click Create Extension.

  4. Search for the Notification extension and click Create. This opens the form for defining a new notification template.

Defining a notification template

Fill out the notification template creation form to define a new notification template and click Save to enable it. The form includes the following sections:

1. General info

Give your notification template an internal name and description for managing it in your app's dashboard. These are only visible to you.

Choose a name and description that make clear what the notification is about and who receives it. For example, you might choose a name like "New reservation" and a description like "Sent to the site owner when a customer makes a new reservation."

Here you can also find the Notification template ID. You need this ID to identify your notification template in API calls.

2. Recipients

Define who receives notifications of this type and where they receive them:

  • Choose whether all site contributors or only site owners receive notifications.
  • Choose where recipients receive notifications: in the site feed on the Dashboard, in the Wix Owner mobile app, or in both. Recipients who receive notifications in the mobile app receive push notifications on their mobile device and can see the notifications in the app's notification center.

3. Message

Create the notification content.

If you enable notifications to the mobile app in the Recipients section, a Title field appears here. Enter a notification title that recipients will see.

In the Message field, enter the text of your notification.

The message and the title can include placeholders for dynamic values you provide each time you send an HTTP request to trigger notifications. For example:

Title: Item delivered: {{itemType}}.

Message: {{customerName}} has received a {{itemType}} delivery.

When triggering a notification with the Notify endpoint in your code, pass values for itemType and customerName, so a recipient sees a customized notification like this:

Title: Item delivered: television.

Message: Sally Jones has received a television delivery.

4. API consumption

Remember your notification template ID and the names of placeholders for dynamic values in your message and title, as you'll need them to invoke the API and trigger notifications.

You can always return to Extensions page in your app's dashboard to find these details.

Click Save to generate your notification template. You can now trigger notifications with the Notify endpoint.

Did this help?