How to customize a notification with the name of the user?

tech
how-to

#1

More broadly, I would like to customize my notifications with data about each of my users. For example, with his name: Hi John, …. It can also be with the name of the product they put in their shopping cart.

The process to configure a notification to be customized based on end-user properties, is two-step:

  1. Enrich your installations with the custom properties that you want to use as personalization parameters.
  2. Write the notification using Liquid language markup to format personalized parts.

Let’s take a simple example:

  1. When John Doe goes to your website or opens your application, you set a custom property string_name to the value "John". On your website, you would use the following code:
    WonderPush.ready(function(WonderPushSDK) {
        WonderPushSDK.putInstallationCustomProperties({
            string_name: "John",
        });
    });
    
  2. On your WonderPush dashboard, in the Notifications page, click Create notification. In the Compose tab, in the Title field for example, you will enter the following text:
    Hello {{installation.custom.string_name}}!.
    You can do this on any textual field of the notification; so John will receive a very personalized notification with his name and the information that matches his needs.

#3