Event type: User

User events are related to users registered in the Magine Pro Platform and changes related to that user object.

The available events are:

User Created

Trigger:
Whenever a user is created, it triggers a User Created event. This can happen either when a user registers to your service, when our platform API is used to create users or when an admin creates an account through the Magine Pro Console.

Type:
user.created

Payload

{
  "type": "user.created",
  "timestamp": "2022-11-03T20:26:10.344522Z",
  "data": {
    "userId": "XXXXXXXXXXXXXXXXXXXXXXXXXUSR",
    "name": "John Doe",
    "country": "SE",
    "locale": "sv",
    "email": "[email protected]",
    "emailOptIn": true,
    "mobilePhone": "",
    "tags": ["tag", "tag-b"],
    "birthDate": "1990-12-24",
    "gender": "male",
    "zipCode": "12345"
  }
}

User Updated

Trigger:
User updated is triggered any time a user object is updated. This can occur through various channels, including the user making changes themselves, an administrator updating information in the Magine Pro Console, or an internal platform process modifying a field based on business logic.

Type:
user.updated

Payload

{
  "type": "user.updated",
  "timestamp": "2022-11-03T20:26:10.344522Z",
  "data": {
    "userId": "XXXXXXXXXXXXXXXXXXXXXXXXXUSR",
    "name": "John Doe",
    "country": "SE",
    "locale": "sv",
    "email": "[email protected]",
    "mobilePhone": "",
    "tags": ["tag", "tag-b"],
    "birthDate": "1990-12-24",
    "gender": "male",
    "zipCode": "12345"
  }
}

User Deleted

Trigger:
A user can be deleted from the service either if the feature is enabled in iOS and Android devices or by and admin through the Magine Pro Console. When the user is deleted, a user deleted event will be triggered.

Type:
user.deleted

Payload

{
  "type": "user.deleted",
  "timestamp": "2024-03-06T14:41:43.304Z",
  "data": {
    "userId": "XXXXXXXXXXXXXXXXXXXXXXXXXUSR",
    "email": "[email protected]"
  }
}

Parameters

In the various events, the included parameters inside the data object will vary between the different events and what was actually added or changed in the user object. These are the parameters that can be included:

Field

Type

Description

userId

string

ID of the user.

name

string

Name of the user.

country

string

Country of the user.
Decides e.g. what Offers
the user can purchase.

locale

string

The locale set on the user.
Decides e.g. what language
Should be used in
transactional e-mails.

email

string

Email for the user.

emailOptIn

boolean

If the user have opted in to
get marketing e-mails or not
when going through the
registration process.

emailBeforeUpdate

string

Is only included if the contact
e-mail for the user have been
changed. This value will be
the old e-mail. Could e.g. be
used to update the e-mail in
thirdparty CRM tools.

mobilePhone

string

Phone number for the user.
Rarely used.

tags

array

Tags set on the user.
Can e.g. be tags added
automatically on the user
during registration.

birthDate

string

Birthdate of the user.
Can e.g. be set on the
user upon registration.

gender

string

Gender set on the user.
Can e.g. be selected by
user during registration.

zipCode

string

Zip code for the user.
Can e.g. be entered by the
user during registration.