Home » Use Cases

Send Account Balance Notifications

MAM - Send Account Balance Notifications - high-level overview

The digital age is completely changing the way financial institutions engage with their customers. As smartphones become an integral part of our daily life, today’s consumers are demanding tighter control over their day-to-day finances. This means expectations for real-time information about their money are growing as well. 

Help your customers easily track their finances – send automatized real-time push notifications to your mobile app users.

Delivered on lock screen, push notifications inform users about any account balance change – from cash withdrawal to transaction confirmation in the moment that the transaction has been made. To ensure the highest delivery rates, combine push notifications with SMS.

This use case demonstrates an effective way to send push notifications to your end users and enable failover with SMS in case the notification was not delivered on time via Infobip API.

Process Workflow

MAM - Send Account Balance Notifications - process workflow

IMPLEMENTATION STEPS

Setup over web interface

1. Log in to the web interface and go to Apps.

2. Click on the registered application you will use to send push notification and copy the Application code by clicking on the code.

MAM - Send Account Balance Notifications - application code

Steps over API

1. Create scenario with Push as the primary channel and SMS as failover. Use the copied application code.

{
    "name": "Account balance with failover",
    "flow": [
        {
            "from": "{{__APP CODE__}}",
            "channel": "PUSH"
        },
        {
            "from": "Infobip",
            "channel": "SMS"
        }
    ],
    "default": false
}

As a response to the request a scenario key is created. You can find the example below.

{
    "key": "{{__SCENARIO KEY__}}",
    "name": "Account balance with failover",
    "flow": [
        {
            "from":"{{__APP CODE__}}",
            "channel": "PUSH"
        },
        {
            "from": "YOUR BANK",
            "channel": "SMS"
        }
    ],
    "default": true
}

2. Send an OMNI message

{ 
  "scenarioKey": "{{__SCENARIO KEY__}}",
  "destinations":[ 
    { 
      "to":{
        "phoneNumber": "{{phone number}}",
        "externalUserId": "{{externalId}}"
      }
    }
  ],
  "sms": {
    "text": "Purchase VISA1111 amount of xxx.xxUSD. Your balance is yyyy.yyUSD"
  },
  "push": {
    "text": "Purchase VISA1111 amount of xxx.xxUSD. Your balance is yyyy.yyUSD"
    },
    "notificationOptions": {
      "vibrationEnabled": true,
      "soundEnabled": true,
      "badge": 1
    }
  }
}

More details about push scenario.

PRO TIP

Let’s assume a more complex situation: in your back-office systems every customer has a unique id, but not every back-office system stores the customer mobile phone number. And you still want to send a push notification with failover to SMS.

To accomplish this task, you can use customer’s unique identifier to target the correct end customer. Infobip web interface supports “External Id” field in profiles which you can use to link the client in your back-office system with the user profile in the Infobip platform. Check Person profile for detailed information.

As this is a scenario with failover to SMS, you need to retrieve the user's phone number from the user profile in the platform. Use the request below to retrieve the user profile through external user id.

https://{base url}/people/2/persons?externalId= customer_21234

More details on how to get a single person profile.

After you have retrieved the person's phone number, you can pass it on to the scenario above to send the push notification with failover to SMS.


Related Products

Stay connected with every user and keep them active over the long term.