Webservices related to Profiles

The notion of 'Profiles' in ACTITO allows you to manage tables of data towards which communication will be possible. For example, a 'profile' is a customer, a prospect, a partner,... who can receive a communication through an 'interaction' channel in ACTITO (e-mail, SMS, print campaign,...)

These profile tables are structured by means of 3 kinds of data :

  • attributes

  • subscriptions

  • segmentations

For additional information regarding the set up of your profile database and its components, we invite you to read the chapter dedicated to 'Profiles'.

Profile APIs

Creating your profile table is not possible through the ACTITO APIs. It is necessary to create it directly in the interface.

The creation of your profile table is therefore a prerequisite to be able to use 'profiles' APIs, which allow you to manage all operations related to profiles.

Moreover, we advise this table to be populated by at least 1 profile, in order to ease up the implementation of APIs. This will indeed allow to easily identify the table structure and, especially, all elements expected to parameter the attributes, subscriptions and segmentations which make up a profile.

However, profile APIs give you the possibility to:

  • Obtain the structure of a profile table

  • Obtain information related to profiles

  • Create, update and delete profiles

images/download/attachments/615292640/image2019-3-13_17-1-34.png

Obtaining the structure of a profile table

ACTITO allows you to create your own structure for your profile tables. Indeed, even if predefined attributes are suggested, you are free to choose which to use, to create new ones, as well as to set up subscriptions and segmentations.

After the creation in the ACTITO interface, a profile table will be characterized by:

  • A name 't'. In our example, 'DemoDoc'

  • An entity 'e', which indicates the access rights. For example: 'actito'

To obtain the structure of a profile table, you can use the operation GET/entity/{e}/table/{t}

This will allow you to understand how the structure of the table that you created in the ACTITO interface is transposed in the API. Thanks to this information, it will be easier to carry out POST or PUT methods in order to create a profile import by correctly using every element that make up your profile table.

To do so, use the entity name and the profile table name as parameters.

images/download/attachments/615292640/image2019-3-14_9-31-54.png

Tip

These names are not case sensitive.

Example of a request and its response: (Download this example)

GET/entity/{e}/table/{t}
Curl call:
curl -X GET --header "Accept: application/json" https://test.actito.be/ActitoWebServices/ws/v4/entity/actito/table/DemoDoc
 
Response body:
 
{
"id": 45,
"name": "DemoDoc",
"attributes": {
"addressCountry": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "Country",
"possibleValues": [],
"comment": "Address country"
},
"lastName": {
"mandatory": true,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "Name",
"possibleValues": [],
"comment": "Last name"
},
"firstName": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "Name",
"possibleValues": [],
"comment": "First name"
},
"emailAddress": {
"mandatory": true,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "EmailAddress",
"possibleValues": [],
"comment": "e-Mail address"
},
"nbChildren": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "Integer",
"possibleValues": [],
"comment": "Number of children"
},
"sex": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "Sex",
"possibleValues": [],
"comment": "Sex"
},
"customerId": {
"mandatory": true,
"multiValue": false,
"unicity": "UNIQUE_FOR_ALL_ELEMENTS",
"modifiable": true,
"valueType": "Integer",
"possibleValues": [],
"comment": null
},
"addressLocality": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "String",
"possibleValues": [],
"comment": "Address locality"
},
"rep": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "String",
"possibleValues": [],
"comment": null
},
"birthDate": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "Datum",
"possibleValues": [],
"comment": "Birth date"
},
"motherLanguage": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "Language",
"possibleValues": [],
"comment": "Mother language"
},
"gsmNumber": {
"mandatory": false,
"multiValue": false,
"unicity": "NOT_UNIQUE",
"modifiable": true,
"valueType": "PhoneNumber",
"possibleValues": [],
"comment": "Mobile number"
}
},
"subscriptions": [
{
"name": "Info",
"id": 30
},
{
"name": "Newsletter",
"id": 29
},
{
"name": "Offer",
"id": 28
}
],
"segmentations": [
{
"segmentation": "IntrtProduit",
"exclusive": false,
"categories": [
"Member"
]
},
{
"segmentation": "Active",
"exclusive": false,
"categories": [
"Member"
]
}
]
}

The body of this response is made of the 3 kinds of elements that make up the profile file.

Attributes

Profile attributes amount to the main data of profiles. Each attribute is defined by parameters that characterize its nature and the way it is used. For additional information about attributes, we invite you to read the chapter explaining how to 'Add an attribute to the profile table'.

The body of the answer will show the attributes one after the other, along with the detail of its parameters. These are characterized as follows :

  • "mandatory": This parameter shows whether or not the attribute is mandatory, with a 'true/false' format.

  • "multiValue": This parameter shows whether the attribute can have several values, with a 'true/false' format. In such a case, the values for a specific profile will be presented as follows: ["a", "b"].

  • "unicity" states whether the attributes is unique or not. It can be :

    • UNIQUE_FOR_ALL_ELEMENTS: The value can be present for only one profile within the database. This will be the case for attributes used as 'keys' (for example: 'clientId' or 'emailAddress')

    • NOT_UNIQUE: The value of this attribute can be identical for several profiles (for example: a first name or a country)

    • UNIQUE_BY_ELEMENT: This is only applied for multi-values attributes. This implies that each value can only appear one for each profile.

  • "valueType": This parameter shows the expected format of the attribute (for example: integer, boolean, phone number,...)

  • "possibleValues": This parameter shows which values are accepted by the attribute. Values not included in this restriction will be rejected. This parameter is optional.

  • "comment": This is the description of the attribute. It is optional.

Subscriptions

Subscriptions are the representation of the 'opt-ins' of each profile. For additional information about subscriptions, we invite you to read the chapter on 'Adding a subscription to the profile table'.

In the response body of the webservice request, they are named 'subscription' and their components are:

  • "name": This parameter states the name of the attribute

  • "id": This is the auto-generated technical id of the attribute. It is specific to each database.

Segmentations

Segmentations allow you to group profiles based on common characteristics. For additional information about segmentations, we invite you to read the chapter on 'Adding a segmentation to a profile table'.

In the response body of the webservice request, they are named 'segmentation' and their characteristics are:

  • "segmentation": This is the technical name of the segmentation. It is auto-generated at the creation of the segmentation within the interface, on the basis of your chosen display name but without spaces and special characters. Please note that, although it is possible to edit the display name of a segmentation in the interface, the technical name cannot be modified and will always remain the original one.

  • "exclusive": This parameter shows whether the segmentation is exclusive, with a 'true/false' format. An exclusive segmentation differs from a simple segmentation in that a sub-category of segments exists.

  • "categories":

    • In the case of exclusive segmentations, this shows the various segments to which a profile can belong.

    • For simple segmentations, the only category is "Member", which states whether or not a profile belongs to the segmentation.

Obtaining profile characteristics

Obtaining the characteristics of a given profile

After getting to know the structure of the profile table, you have the necessary elements to correctly parameter profile import methods.

However, it might prove useful to obtain information on profiles already existing in your database. This is will give you a practical example of the information expected for profile creation calls, especially when it comes to the characteristics of individual attributes. Afterwards, this operation will allow you to call the data of a profile, for example if the they want to consult their contact details in their client area.

You can retrieve details about a specific profile through the operation GET/entity/{e}/table/{t}/profile/{p}

To do so, you will need to indicate the following parameters:

  • The entity

  • The profile table

  • The profile whose data you want to search: you will have to either use the technical ID of a profile (id generated by ACTITO at the creation of the profile, named "profileId") or any attribute defined as a unique key (for example: the client number, the e-mail address,...). In the second case, you need to use format 'keyAttribute=value' (for example, emailAddress=mailtest@actito.com). To know which attribute is used as a key, go to the 'Reaching a Profile File'.

images/download/attachments/615292640/image2019-3-14_12-25-15.png

Example of a request and its response for this operation: (Download this example)

GET/entity/{e}/table/{t}/profile/{p}
Curl call:
curl -X GET --header "Accept: application/json" "https://test.actito.be/ActitoWebServices/ws/v4/entity/actito/table/demodoc/profile/147471"
 
Response body:
{
"attributes": [
{
"name": "profileId",
"value": "147471"
},
{
"name": "creationMoment",
"value": "14/02/2019 13:58:23"
},
{
"name": "updateMoment",
"value": "14/03/2019 12:22:33"
},
{
"name": "lastName",
"value": "Doe"
},
{
"name": "firstName",
"value": "Jane"
},
{
"name": "birthDate",
"value": "03/04/1956"
},
{
"name": "sex",
"value": "F"
},
{
"name": "motherLanguage",
"value": "EN"
},
{
"name": "emailAddress",
"value": "mailtest@citobi.com"
},
{
"name": "addressLocality",
"value": "Waterloo"
},
{
"name": "addressCountry",
"value": "BE"
},
{
"name": "gsmNumber",
"value": "1223344556"
},
{
"name": "customerId",
"value": 12189
},
{
"name": "nbChildren",
"value": 2
},
{
"name": "rep",
"value": "3"
}
],
"subscriptions": [
{
"name": "Newsletter",
"id": 29
}
],
"segmentations": [
{
"name": "TypeClient",
"category": "Silver"
},
{
"name": "Active",
"category": "Member"
}
]
}

Please note that some technical attributes are automatically given in the answer. These attributes cannot be modified. They are:

  • "profileId": The auto-generated technical id, which you could use as key

  • "creationMoment": The creation time and date

  • "updateMoment": The time and date of the latest update

Only subscriptions and segmentations currently associated to the profile will be displayed. Any segmentation or subscription to which the profile does not belong will not appear.

Using query parameters

If you do not know the 'profileId' or any other key attribute of a given profile, or if you want to obtain a list of profiles based on specific criterion, it is possible to use query parameters through the operation GET/entity/{e}/table/{t}/profile

These query parameters are:

  • "search": Search criterion that can be made of multiple criteria separated by ';'. This criterion is made of the technical name of the attribute, followed by the '=' operator and a value

  • "dateFilter": Search criterion based on a date that can be made of multiple criteria separated by ';'. This criterion must be based on the 'creationMoment' or 'updateMoment' attributes, followed by an operator ('>', '<', '>=' or '<=') then by a date value.

  • "number": This parameter limits the amount of results displayed (200 is the default and maximum value).

images/download/attachments/615292640/image2019-3-14_13-50-50.png

Should you wish to retrieve the details of any profile, in order to get to know the structure of a profile file, you can set the "number" filter to 1.

Obtaining profile interactions

It is possible to retrieve the interactions of a profile through the operation GET/entity/{e}/table{t}/profile{p}/interactions

In such a case, the entity, the profile table and the profile id must be used as parameters. In addition, the following criteria are available:

  • "dateFilter": This is a date criterion based on the 'creationMoment' attribute

  • "typeFilter": This is a filter based on the interaction type. Leave this field empty to include all interactions. Only one kind of interaction can be targeted at once. If you want to target interactions linked to Custom Tables, you need to choose the 'UserDefined' filter.

  • "includeTest": This filter allows you to include and exclude test interactions.

images/download/attachments/615292640/image2019-3-14_14-38-54.png

Example of a request and its response for this operation: (Download this example)

GET/entity/{e}/table/{t}/profile/{p}/interactions
Curl call:
curl -X GET --header "Accept: application/json" "https://test.actito.be/ActitoWebServices/ws/v4/entity/actito/table/demodoc/profile/147471/interactions?typeFilter=Mail&includeTest=true"
 
Response body:
{
"interactions": [
{
"id": "1854",
"type": "Mail",
"businessKey": "actito",
"attributes": {
"Status": "SENT_OPENED_WITH_CLICK",
"Test": "true",
"actitoInteractionId": "1854"
},
"campaignId": 178,
"creationMoment": "19/02/2019 15:12:28"
},
{
"id": "1869",
"type": "Mail",
"businessKey": "actito",
"attributes": {
"Status": "SENT_OPENED_WITH_CLICK",
"Test": "true",
"actitoInteractionId": "1869"
},
"campaignId": 178,
"creationMoment": "19/02/2019 15:31:05"
},
{
"id": "1875",
"type": "Mail",
"businessKey": "actito",
"attributes": {
"Status": "SENT_OPENED_WITH_CLICK",
"Test": "true",
"actitoInteractionId": "1875"
},
"campaignId": 178,
"creationMoment": "19/02/2019 15:36:24"
},
{
"id": "1909",
"type": "Mail",
"businessKey": "actito",
"attributes": {
"Status": "SENT_OPENED_WITH_CLICK",
"Test": "true",
"actitoInteractionId": "1909"
},
"campaignId": 178,
"creationMoment": "20/02/2019 11:54:41"
}
]
}

Obtaining the subscriptions of a profile

It is possible to retrieve the list of subscriptions to which a profile subscribed through the operation GET/entity{e}/table{t}/profile{p}/subscription

In such a case, the entity, the profile table and the profile id must be used as parameters

Example of a request and its response: (Download this example)

GET/entity/{e}/table/{t}/profile/{p}/subscription
Curl call:
 
curl -X GET --header "Accept:
application/json" "https://test.actito.be/ActitoWebServices/ws/v4/entity/actito/table/demodoc/profile/147471/subscription"
 
Response body:
 
{
"subscriptions": [
{
"name": "Newsletter",
"id": 29
},
{
"name": "Info",
"id": 30
}
]
}

Obtaining the segmentation of a profile

It is possible to retrieve the list of segmentations to which a profile belongs through the operation GET/entity{e}/table{t}/profile{p}/segmentation

In such a case, the entity, the profile table and the profile id must be used as parameters

Example of a request and its response: (Download this example)

GET/entity/{e}/table/{t}/profile/{p}/segmentation
Curl call:
 
curl -X GET --header "Accept:
application/json" "https://test.actito.be/ActitoWebServices/ws/v4/entity/actito/table/demodoc/profile/147471/segmentation"
 
Response body:
 
{
"segmentation": [
{
"name": "TypeClient",
"category": "Silver"
},
{
"name": "Active",
"category": "Member"
}
]
}

Creating or updating a profile

Once you know the structure of a profile table, it is possible to populate it directly through the ACTITO webservices.

The ACTITO APIs allow to ways to create of update profiles in a database: one by one or in bulk. Choosing between these two processes must be based both on the requirements of your own business activity but also on the limits regulating the use of webservices.

You should therefore ask yourself the following questions:

  • Is real-time synchronization necessary?

  • Do you need to trigger real-time scenarios?

  • Which volume are you handling?

  • Is your preferred method compatible with the call limitations?

Bulk APIs must be used when data can be accumulated until reaching a volume large enough for batch processing. The mass import API method is not meant to repeatedly post light files containing only a few records. There is indeed a limitation of 12 bulk calls per day. Moreover, mass imports are asynchronous. Posting several files at once is not an accepted practice, as they will be taken into account one after the other.

On the other hand, when the data is designed to trigger a workflow or must be immediately synchronized with the database, you should opt for one by one calls.

Should the specificities of your activity require a mix of real-time synchronization and daily synchronization, we advise you to divide your calls between mass imports and one by one calls on a case by case basis depending on the volume and immediacy required.

Creating and updating a single profile

Several operations exist for the creation and the update of profiles one by one. One advantage of this course of action is that there are pre-parametered operations aimed at updating specific elements of a profile table, such as subscriptions and segmentations.

For a detailed explanation regarding these operations, we invite you to read the 'Creating or Updating a Single Profile' page.

Creating and updating profiles in bulk

Mass imports are based on data files. Should some data entries fall into error during the import attempt, you will obtain their details in order to let you rectify this problem.

To learn how this method works, please consult the 'Creating or Updating Profiles in Bulk' page.