These docs are for v1.9. Click to read the latest docs for v2.1.

Segment Your Audience

Why segment your audience?

Arianee builds a new way for brands to connect with customers.

Segmenting the audience is essential for effective communication because it allows tailored campaigns to be crafted to suit the specific needs, preferences, and characteristics of each segment.

Use cases

  • Your brand distributes product passports according to the product model. Each digital passport of a model is associated with a tag. You want to send a campaign to the owners of a particular model.
  • Your brand distributed digital passports in an account that is not tied to the client account (non-custodial), you want to reach out to this audience.

What segmentation?

To target your audience for a new once-off message campaign, you need to segment the recipients of your campaigns. You can decide to target your audience using:

  • tags: pre-defined tags associated with a pool of digital passports.
  • custodialWallet: target custodial or non-custodial wallets.
  • isWalletActiveSinceNumberOfDays: define the number of days the user has been active on his wallet lately.
  • countries: target countries.

Create Audience

URL

To create a new audience segment, use /audience/create.

POST - https://{{nmpUrl}}/audience/create

Body

Field

Type

Required

Description

name

String

Name of the audience for your campaign.

tagRule

Object

Tag rules that define if your audience must own all mentioned tags or at least one.
or: The owner must have a digital passport with at least one defined tag.
and: The owner must have a digital passport that includes all specified tags.

tags

Object

Tag(s) associated with the digital passports you wish to target.

uniqueOwner

Boolean

true: One message is sent per wallet even if your customer owns several digital passports.

custodialWallet

String

Custodial or non-custodial wallet.
yes: Send to custodial wallet only.
no: Send to non-custodial wallet only.
all: Both types of wallet.

isWalletActiveSinceNumberOfDays

Number

A period in days during which activity was observed on the user's wallet.

countries

Object

Define the target country.
String with values separated by a pipe
Example: France|Spain...
⚠️ Countries are case-sensitive.

{
    "name": "Audience test",
    "tagRule": "all",
    "tags": "test",
    "uniqueOwner": false,
    "custodialWallet": "yes", 
    "isWalletActiveSinceNumberOfDays": 30,
    "countries": [
        "France",
        "Spain"
    ]
}

Return Payload

Status CodeSuccessDescription
200trueThe audience segment has been created.
{
    "name": "audience test 123",
    "tagRule": "all",
    "uniqueOwner": false,
    "_id": "660ffa248b242638ac6ccac5",
    "createdAt": "2024-04-05T13:18:28.777Z",
    "updatedAt": "2024-04-05T13:18:28.777Z",
    "__v": 0
}

Update Audience

URL

To update an existing audience segment, use /audience/:id.

PATCH - https://{{nmpUrl}}/audience/:id

Body

Field

Type

Required

Description

name

String

Name of the audience for your campaign.

tagRule

Object

Tag rules that define if your audience must own all mentioned tags or at least one.
or: The owner must have a digital passport with at least one defined tag.
and: The owner must have a digital passport that includes all specified tags.

tags

Object

Tag(s) associated with the digital passports youwish tot target.

uniqueOwner

Boolean

true: One message is sent per wallet even if your customer owns several digital passports.

custodialWallet

String

Custodial or non-custodial wallet.
yes: Send to custodial wallet only.
no: Send to non-custodial wallet only.
all: Both types of wallet.

isWalletActiveSinceNumberOfDays

Number

A period in days during which activity was observed on the user's wallet.

countries

Object

Define the target country.
String with values separated by a pipe
Example: France|Spain...
⚠️ Countries are case-sensitive.

{
    "name": "Brand A Campaign",
    "tagRule": "all",
    "uniqueOwner": true
}

Return Payload

Status CodeSuccessDescription
200trueThe audience has been updated.
{
    "_id": "660ffa248b242638ac6ccac5",
    "name": "Audience test",
    "tagRule": "all",
    "uniqueOwner": true,
    "createdAt": "2024-04-05T13:18:28.777Z",
    "updatedAt": "2024-04-05T13:27:52.838Z",
    "__v": 0
}

Errors

Status CodeSuccessDescription
404falseThe ID may be wrong or the audience does not exist.
400falseThe audience format is incorrect.
{
    "error": "audience not found"
}
{
    "errors": [
        {
            "value": "660ffa248b242638ac6ccac3za",
            "msg": "audienceId must be a mongoId",
            "param": "audienceId",
            "location": "params"
        }
    ]
}

Fetch Specific Audience

URL

To fetch the information on a specific audience, use /audience/:id.

GET - https://{{nmpUrl}}/audience/:id

Return Payload

Status CodeSuccessDescription
200trueThe details of the audience are returned.
{
    "_id": "6616949cf8c304e92359c111",
    "name": "name",
    "tags": [],
    "description": "this is the description",
    "uniqueOwner": true,
    "tagRule": "tokenIds",
    "isWalletActiveSinceNumberOfDays": 30,
    "custodialWallet": "all",
    "countries": [
        "France",
        "Middle-earth",
        "Taiwan",
        "Belgium"
    ],
    "walletActivity": "inactive",
    "createdAt": "2024-01-15T13:28:22.250Z",
    "updatedAt": "2024-04-10T13:44:04.141Z",
    "tokenIds": {
        "type": "Buffer",
        "data": [
            51,
            52,
            51
        ]
    }
}

Errors

Status CodeSuccessDescription
404falseThe ID may be wrong or the audience does not exist.
{
    "error": "audience not found"
}

Fetch Audience List

URL

To fetch all the existing audience segments, use /audience/list.

GET - https://{{nmpUrl}}/audience/list

Return Payload

Status CodeSuccessDescription
200trueThe audience details are returned, such as the count of digital passports or the count of owners.
[
    {
        "_id": "660c1bb344de4dd929227df5",
        "name": "test"
    },
    {
        "_id": "660e6d0549f0c37e6e8f9922",
        "tags": [
            "testProduct3"
        ],
        "countries": [],
        "productIds": [],
        "campaignName": "Brand1Campaign",
        "status": "CREATED",
        "content": "{\"title\":\"Title\",\"content\":\"Salut CYril\",\"$schema\":\"https://cert.arianee.org/version5/ArianeeProductCertificate-i18n.json\"}",
        "isWalletActiveSinceNumberOfDays": 30,
        "tagRule": "all",
        "createdAt": "2024-01-18T10:42:23.509Z",
        "updatedAt": "2024-01-18T10:42:24.299Z",
        "__v": 0,
        "countNFT": 12,
        "countOwner": 10
    },
    {
        "_id": "660e6d2b49f0c37e6e8f9924",
        "tags": [],
        "countries": [],
        "productIds": [
            "SN12345"
        ],
        "campaignName": "Brand2Campaign",
        "userId": "3bc04af9-4507-42dc-853c-248af9dea824",
        "status": "CREATED",
        "content": "{\"title\":\"Hello Fellow Friends\",\"content\":\"Welcome to your brand new Rolex\",\"$schema\":\"https://cert.arianee.org/version5/ArianeeProductCertificate-i18n.json\"}",
        "isWalletActiveSinceNumberOfDays": 30,
        "tagRule": "productIds",
        "createdAt": "2024-01-24T11:25:03.282Z",
        "updatedAt": "2024-01-24T11:25:04.153Z",
        "__v": 0,
        "countNFT": 34,
        "countOwner": 56
    }
]