User Property Personalisation in Campaign API's


#1

Warning : Please test the user property personalisation via APIs internally before using it in production.

How to find values : Dynamic replacements in email HTML?

User Property Personalisation in APIs :

Format : $replacement$##w:apipersonalisationcheck[ add your default value here ]$/replacement$

e.g. Sample Payload :

 {
    "name": "Api personalisation",
    "estimate_only": true,
    "target_mode":"push",
    "where": {
  
    },
    "respect_frequency_caps": false,
    "content": {
        "title": "Hey $replacement$##n:[User]$/replacement$",
        "body": "Here is $replacement$##w:apipersonalisationcheck[default]$/replacement$ %off !!!",
        "platform_specific": {
            "windows": {
                "deep_link": "example.com",
                "Key": "Value_windows"
            },
            "ios": {
                "mutable-content": "true", 
                "deep_link": "example.com",
                "sound_file": "example.caf",
                "category": "application category//Books",
                "badge_count": 1,
                "Key": "Value_ios"
            },
            "android": {
                "background_image": "http://example.jpg",
                "default_sound": true,
                "deep_link": "example.com",
                "large_icon": "http://example.png",
                "Key": "Value_android",
                "ttl":24 ,
                "wzrk_cid":"got"
            }
        }
    },
    "devices": [
        "android",
        "ios",
        "windows"
    ],
    "when": "now"
}

In case of Profile Attributes, you need to use ##n for Name:
Name ="$replacement$##n:[ add your default value here ]$/replacement$"

Recommended Steps before using it in production :

  1. Test Internally before targeting production users
  2. Have an additional client side to avoid user’s getting notifications with default values. Our recommendation is to add the same. It is better to not render the notification, then rendering it with default values.
    Add a client side check for the following values : “default”, “replacement”, “[]”: square brackets