DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Databases
  4. Send Personalized Push Notifications at Scale

Send Personalized Push Notifications at Scale

In this post, we walk through how to use a freely available backend as a service platform to create scalable push notifications.

Oleg Vyalyh user avatar by
Oleg Vyalyh
·
May. 01, 19 · Tutorial
Like (1)
Save
Tweet
Share
6.52K Views

Join the DZone community and get the full member experience.

Join For Free

Push Notifications

The ability to send push notifications has been a key Backendless feature for quite a while, but until now, it only had a basic set of actions such as sending to all devices in a specific channel and/or to a specific device type (Android/iOS). With the last changes it has grown into a powerful tool with a bunch of very flexible and convenient functionality. Now you can:

  • send push notifications for a precisely defined group of recipients using not only filters by channel/device, but also BackendlessDataQuery, which allows you to select target devices using a query to the table.
  • personalize your messages with smart-text — auto substitutions with the personal information from the table or any other related tables.
  • construct and customize the styling of your messages in a new graphical interface.
  • construct interactive messages with actions mapped to Buttons/Inline reply/Tap.

In this article, we're going to review the first two points and in the next article the last two.

Targeting

First, let's prepare the tables with relations. The tables we'll be using are users, preferences, and address. We've provided some fields for us to use. You can populate the tables with arbitrary values of your choice.

Users

Preferences

Address

Now, let's go to the Messaging tab.

You'll see a wizard that will help you compose a new push template. Follow the numbers in red circles on the image above. On step 6, you need to enter the where clause (just as you would for a Data service). The request is made to the DeviceRegistration table. Here's an example request:

user.address.street = 'New Avenue' and user.preferences.favorite_color = 'red'

If you have a user with those characteristics, you'll see on the top right of the screen the estimated number of recipients (in my case, it is only one individual).

The button "See Devices" moves you to the Data tab, where you can see the listing of devices. The button "Send Now" will immediately send your push notification message to the filtered recipients. It is not active now, because we haven't configured the current template completely.

Personalization

Now let's look at how to configure the content of the message so that it contains user-specific information. We call this smart-text.

You can use substitution for fields such as Message, Title, Subtitle, and header values. Clickable "add smart text" helps you construct a smart-text message using values from the tables (related to your Users table).

When you press "add smart text," the popup window appears, where at the bottom you can choose the table and column from which the value will be inserted in the notification.

Here is an example with the values from related tables:

And this is the resulting push notification content:

Send Push-Notification

Before sending, you should save the template. This will allow you to reuse this setup for future notifications and can be accessed in your Cloud Code to create automated personalized notifications. Once you save the template, the "Send Now" button will become active.

That's all for today. In the next article in this series, we will take a look at customizing the appearance of your notifications and adding interactive buttons, inline reply capability, and notification tap functionality. Happy coding!

push Database

Published at DZone with permission of Oleg Vyalyh, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Apache Kafka Is NOT Real Real-Time Data Streaming!
  • How Chat GPT-3 Changed the Life of Young DevOps Engineers
  • NoSQL vs SQL: What, Where, and How
  • Top 5 Data Streaming Trends for 2023

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: