A Contact object to represent the details of a User in CX (E-Commerce) and Contact in AX (CRM).
This is used to manage contact data across any channel, from a single master source, either seen as a User for CX perspective as contact that has been granted to get ecommerce access or any kind of Contact for AX or Opco, covering contact core data ( profile, contact touch points, consents, attachment to accounts )
The identifier is optional when creating a new contact (scope=CONTACT_CORE and type=COMMAND). It is mandatory when updating an existing contact.
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_CORE"
"COMMAND"
"EVENT"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_CORE"
"EVENT"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_ACCOUNTS"
"EVENT"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_ECOMMERCE_USER"
"EVENT"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_CONSENT"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_CORE"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_ACCOUNTS"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"CONTACT_ECOMMERCE_USER"
{
"eventHeader": {
"source": "SPARK",
"version": "v1",
"scope": [
"CONTACT_CONSENT"
],
"type": "COMMAND",
"request": {
"id": "1234567",
"target": "SPARK_AX"
}
},
"identifiers": {
"contactId": "123456780912345678"
},
"consentArea": {
"consents": [
{
"name": "ORDER_SHIPPED",
"category": "TRANSACTIONAL",
"subCategory": "TRACK_AND_TRACE",
"channels": [
{
"type": "EMAIL",
"userPreference": true
},
{
"type": "PUSH_NOTIFICATION",
"userPreference": true
},
{
"type": "SMS",
"userPreference": false
}
],
"lastModified": "2024-01-01T00:00:00Z"
},
{
"name": "PROMOTIONS",
"category": "MARKETING",
"subCategory": "GENERAL",
"channels": [
{
"type": "EMAIL",
"userPreference": false
},
{
"type": "PUSH_NOTIFICATION",
"userPreference": true
},
{
"type": "SMS",
"userPreference": true
}
],
"lastModified": "2024-01-01T00:00:00Z"
}
]
}
}
This object describes meta-data information related to the event
{
"source": "SPARK",
"version": "v1",
"scope": [
"CONTACT_CONSENT"
],
"type": "COMMAND",
"request": {
"id": "1234567",
"target": "SPARK_AX"
}
}
{
"source": "SPARK_AX",
"version": "v1",
"scope": [
"CONTACT_CONSENT"
],
"type": "EVENT",
"request": {
"id": "1234567",
"target": "SPARK"
}
}
The source of this event. It can be:
SPARK : when the message is originating from SPARK webshop, eg: to update the consents of a contact.
SPARK_AX : when the message originates from Dynamics 365. eg: to respond to a Command from SPARK CX, or to opco.
OPCO : to feed the data for a contact from the Opco to SPARK
"SPARK"
The version of the json format event
"v1"
All items must be unique
No Additional ItemsScope is used to decide what to be updated in the case of a matched online contact ( using email field ).
- CONTACT_CONSENT : to enable to update consent preferences.
- CONTACT_CORE : the scope used when one of the user profile data is updated
- CONTACT_ACCOUNTS : the scope used to controle accounts access
- CONTACT_ECOMMERCE_USER : the scope used when permissions or any other ecommerce related information is updated.
Only scopes having the same master can be used at the same time.
"CONTACT_CONSENT"
The type of the event.
- COMMAND is to request a change of the Contact to the master of the scope.
- EVENT is published by the master of the scope to inform slaves about a change of the Contact.
EVENT can be a successful response to a COMMAND message.
In case the COMMAND event is rejected, then the type returned is COMMAND
"COMMAND"
The object holding the request information.
{
"id": "1234567",
"target": "SPARK"
}
The unique identifier of the request provided by the COMMAND message, and then also returned by the EVENT message. It is used to correlate the EVENT message to the COMMAND message.
Must be at least 1 characters long
"1234567"
The intended consumer of this request. In case this message is EVENT in response to a COMMAND, request.target is equal to the 'source' value of the COMMAND
It can be:
SPARK - when the target is SPARK webshop, eg: to receive the updates of the consents of a contact.
SPARK_AX when the message is intended to be updated to Dynamics 365. eg: to update a contacts details.
OPCO, possibly when there is error in the contact request sent by OPCO.
"SPARK"
The object holding the identifiers for the contact
{
"contactId": "123456780912345678"
}
Unique identifier for the contact
Must be at least 1 characters long
The errors being responded for the Contact command previously sent by the source. This can only be filled when COMMAND is sent by the master.
Must contain a minimum of 1 items
The object holding the errors for the contact.
{
"code": "CONTACT_NOT_FOUND",
"message": {
"en-GB": "Contact abc@corporate.fr is unknown",
"fr-FR": "Le contact abc@corporate.fr est inconnu"
}
}
{
"code": "ACCOUNT_NOT_FOUND",
"message": {
"en-GB": "Account TESTACCOUNT is unknown",
"fr-FR": "Le compte TESTACCOUNT est inconnu"
}
}
The error code
"CONTACT_NOT_FOUND"
The error message
{
"en-GB": "Contact abc@corporate.fr is unknown",
"fr-FR": "Le contact abc@corporate.fr est inconnu"
}
Each additional property must conform to the following schema
Type: stringThe object holding the consent preferences for the contact. Delta mode is possible, i.e all consent preferences do not need to be sent everytime but only the ones to be created or updated.
{
"consent": [
{
"name": "TRAININGS",
"category": "MARKETING",
"subCategory": "GENERAL",
"channels": [
{
"type": "EMAIL",
"userPreference": true
},
{
"type": "PUSH_NOTIFICATION",
"userPreference": true
},
{
"type": "SMS",
"userPreference": false
}
],
"lastModified": "2024-01-01T00:00:00Z"
},
{
"name": "ORDER_NOTIFICATIONS",
"category": "TRANSACTIONAL",
"subCategory": "GENERAL",
"channels": [
{
"type": "EMAIL",
"userPreference": false
},
{
"type": "PUSH_NOTIFICATION",
"userPreference": true
},
{
"type": "SMS",
"userPreference": true
}
],
"lastModified": "2024-01-01T00:00:00Z"
}
]
}
Array of consents based on categories (Promotions, Track and Trace, Marketing) and subcategories (transactional or non transactional) containing the channel (SMS/EMAIL/PUSH_NOTIFICATION) and consent preference (true/false)
No Additional ItemsConsent on a category and subcategories containing the channel (SMS/EMAIL/PUSH_NOTIFICATION) and consent preference (true/false)
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"ACTIVE"
The status of the consent. ACTIVE is for consents to be updated or added. DELETED is when a Contact wants to remove a device for type PUSH_NOTIFICATION.
"ACTIVE"
The name of the consent object name holding the category, channel and the consent information
Must be at least 1 characters long
"ORDER_NOTIFICATIONS"
"PROMOTIONS"
"TRAININGS"
The type of category to which the event belongs to
"MARKETING"
The subtype of category to which the event belongs to. For TRANSACTIONAL category, it can be either of GENERAL or TRACKANDTRACE. For MARKETING, it should be GENERAL.
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"TRANSACTIONAL"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"MARKETING"
"TRACK_AND_TRACE"
An array of channels containing consent values for different channels. All of the channels are mandatory
Must contain a minimum of 1 items
Channel specifying its consent value for a contact
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"PUSH_NOTIFICATION"
The communication channel and its corresponding consent, whether allowed or not
"EMAIL"
The consent value for the channel
true
The device id of the contact. This is required when type is PUSH_NOTIFICATION
Must be at least 1 characters long
"1234567"
The last date and time of this consent information
"2023-10-12T08:30:22.804Z"
"2023-10-12T08:30:22.804+01:00"
The object holding the core data for the contact. The master is:
CX when only CX is deployed and opco don’t persist user on ERP.
OPCO when only CX is deployed and opco persist user on ERP
AX : when AX and CX are deployed
{
"coreArea": {
"title": "Mr.",
"firstName": "John",
"lastName": "Doe",
"middleName": "M",
"defaultLocale": "en-US",
"email": "john.doe@example.com",
"secondaryEmail": "john.doe2@example.com",
"teamEmail": "team@example.com",
"jobRoleCode": "DEV",
"mobilePhoneNumber": "+1234567890",
"landLinePhoneNumber": "+0987654321",
"alternateMobilePhoneNumber": "+1122334455",
"status": "ACTIVE"
}
}
Title corresponding for this core area
Must be at least 1 characters long
The first name of the contact
Must be at least 1 characters long
"Jean"
The last name of the contact
Must be at least 1 characters long
"Dupond"
The middle name of the contact
Must be at least 1 characters long
User's default language, if not present the account default locale will be used
Must be at least 1 characters long
"fr-BE"
One of email or mobilePhoneNumber should be present. It should be unique if present and cannot be shared by another contact and should be present to be able to access ecommerce platform.
Must be at least 1 characters long
"geert@electracontractors.be"
Should be present and cannot be shared by another contact.
Must be at least 1 characters long
"geert@electracontractors.be"
Email shared across several accounts
Must be at least 1 characters long
"geert@electracontractors.be"
The jobRoleCode chosen by the associate
One of email or mobilePhoneNumber should be present and unique if present, it can’t be shared with another contact
Must match regular expression:^\+[1-9]\d{1,14}$
Landline phone number for this contact
Must match regular expression:^\+[1-9]\d{1,14}$
Should be unique if present, it can’t be shared with another contact
Must match regular expression:^\+[1-9]\d{1,14}$
The last date and time of contacts core information, when updated by the master
"2023-10-12T08:30:22.804Z"
"2023-10-12T08:30:22.804+01:00"
Area holding account related data of contact. Delta mode is possible, i.e all accounts do not need to be sent everytime but only the ones to be created or updated.
{
"attachedAccounts": [
{
"opcoAccountId": "ACC123",
"status": "ACTIVE"
},
{
"opcoAccountId": "ACC456",
"status": "BLOCKED"
},
{
"opcoAccountId": "ACC789",
"status": "DELETED"
}
]
}
Attached accounts must be a subset of the attached accounts in the Account area. Otherwise they cannot be attached to the ecommerce user.
Must contain a minimum of 1 items
The accountID on the opco side
The last date and time of this account information, when updated by the master
"2023-10-12T08:30:22.804Z"
"2023-10-12T08:30:22.804+01:00"
The object holding the data for the ecommerce contact.
Status related to the ecommerce user.
"ACTIVATED"
The last date and time of this ecommerce information, when updated by the master
"2023-10-12T08:30:22.804Z"
"2023-10-12T08:30:22.804+01:00"
Must contain a minimum of 1 items
OpCo's organizational customer number that uniquely identifies its account.
Must be at least 1 characters long
"1234567"
List of permissions allowed for the user in the account.
Must contain a minimum of 1 items
Enumeration of permission available in the Spark platform.
MANAGE_USERS: make the user able to manage other users (this is known as admin user)
VIEW_NET_PRICE: make the user able to see net prices
VIEW_GROSS_PRICE: make the user able to see list,gros prices
VIEW_ORDER_LIST: make the user able to access the order list and details data
CONTRIBUTE_CART: make the user able to create and update a cart
VALIDATE_CART : user having this permission will be able to approve cart of the other users
EXPORT_INVOICE: make the user to download invoices documents
PLACE_ORDER_WITHOUT_VALIDATION: make the user to place an order without needing to wait for a validator approval.
RELEASE_BLANKET_ORDER: User is able to create release/sub order from blanket order and checkout of blanket order (Note - Users with this permission may not have CONTRIBUTE_CART or PLACE_ORDER_WITHOUT_VALIDATION permission and should be able to perform checkout specific to blanket order)
VIEW_BLANKET_ORDER: User is able to view list and details of blanket order (Punchout token would not contain any blanket order related permissions))
MANAGE_ADDRESSES : this permission will allow the user to create/edit/delete delivery addresses.
EDIT_ORDER : allows the user to edit open orders and make adjustments as needed.
PAY_INVOICE : this permission will allow the user to pay invoices online.
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
[
"VALIDATE_CART"
]
The user acts as a cart admin has no limitations on cart checkout, purchase limit and approval of carts
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
[
"CONTRIBUTE_CART"
]
The user is having limited permissions and requires an approval from the user having VALIDATE_CART permissions
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
[
"PLACE_ORDER_WITHOUT_VALIDATION",
"CONTRIBUTE_CART"
]
The user is allowed to contribute and make a checkout if he is ordering under his purchase limit set by his admin, He only requires an approval if he surpasses the purchase limit both at cart limit and monthly purchase limit
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
[
"VIEW_BLANKET_ORDER",
"RELEASE_BLANKET_ORDER"
]
The user is allowed to view list of blanket orders and its details. User is able to release and checkout blanket orders
"VIEW_NET_PRICE"
User's job denomination code. This is code of the reference value provided for the reference type 'JobTitle'.This is required when the job title reference table is not empty for an opco
Must be at least 1 characters long
"003"
user's job denomination, This is required when the job title reference table is not empty for an opco
Must be at least 1 characters long
"Manager"
The max amount that this user can purchase by cart
{
"amount": 100000,
"scale": 2,
"currency": "EUR"
}
{
"amount": 10000000,
"scale": 4,
"currency": "USD"
}
The actual unscaled amount based on list or customer
205987
The scale to be applied on the unscaled amount
2
The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed
Must be at least 3 characters long
"EUR"
The max amount that this user can purchase within a period
{
"limit": {
"amount": 100000,
"scale": 2,
"currency": "EUR"
},
"period": "MONTHLY"
}
{
"limit": {
"amount": 1000000,
"scale": 2,
"currency": "EUR"
},
"period": "MONTHLY"
}
{
"limit": {
"amount": 1000000,
"scale": 2,
"currency": "EUR"
},
"period": "MONTHLY"
}
Contains the amount informations based on the type of prices we might have
The actual unscaled amount based on list or customer
205987
The scale to be applied on the unscaled amount
2
The currency code following the ISO 4217 standard 3 letter in which the prices are being displayed
Must be at least 3 characters long
"EUR"
The period for which the limit is applied.
- MONTHLY: to define purchase limit for current calendar month
"MONTHLY"