Skip to content

Instantly share code, notes, and snippets.

@d2kagw
Last active September 20, 2023 01:02
Show Gist options
  • Select an option

  • Save d2kagw/ad3f133396d8c5640b04d4c31f2b3ba5 to your computer and use it in GitHub Desktop.

Select an option

Save d2kagw/ad3f133396d8c5640b04d4c31f2b3ba5 to your computer and use it in GitHub Desktop.
schema_profile_customer.json - Via automated deployment - Visit https://learn.lexer.io for more information.
{
"type": "object",
"properties": {
"records": {
"type": "array",
"items": {
"title": "Customer",
"type": "object",
"description": "A customer object. Must have at only one linkable field of email, email_sha256, email_md5, mobile, customer_id or external_id. A dataset may be configured to require a particular one of these.",
"required": [
"link"
],
"properties": {
"link": {
"type": "object",
"oneOf": [
{
"title": "Email Link",
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"pattern": "(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",
"example": "jane@fake.com"
}
}
},
{
"title": "Email sha256 Link",
"type": "object",
"properties": {
"email_sha256": {
"type": "string",
"description": "Ensure that the email address is lowercase before hashing.",
"example": "39c500..."
}
}
},
{
"title": "Email md5 Link",
"type": "object",
"required": [
"email_md5"
],
"properties": {
"email_md5": {
"type": "string",
"description": "Ensure that the email address is lowercase before hashing.",
"example": "39c500..."
}
}
},
{
"title": "Mobile Link",
"type": "object",
"properties": {
"mobile": {
"type": "string",
"description": "Formatted with the international code with no spaces or symbols.",
"example": "61400000000"
}
}
},
{
"title": "Customer ID Link",
"type": "object",
"required": [
"customer_id"
],
"properties": {
"customer_id": {
"type": "string",
"description": "A unique identifier for a customer.",
"example": 123456789
},
"system_name": {
"type": "string",
"description": "An optional name for the system of origin.",
"example": "point_of_sale"
}
}
},
{
"title": "External Link",
"type": "object",
"required": [
"external_id"
],
"properties": {
"external_id": {
"type": "string",
"description": "A unique identifier for a profile.",
"example": 123456789
},
"system_name": {
"type": "string",
"description": "An optional name for the system of origin.",
"example": "point_of_sale"
}
}
},
{
"title": "Legacy Customer Link",
"type": "object",
"required": [
"link_type",
"link_value"
],
"properties": {
"link_type": {
"title": "Link Type",
"type": "string",
"enum": [
"email",
"email_sha256",
"customer_id",
"mobile",
"external_id",
"email_md5"
],
"example": "email"
},
"link_value": {
"title": "Link Value",
"type": "string",
"minLength": 1,
"example": "jane@fake.com"
},
"id_type": {
"title": "External ID Type",
"type": "string",
"default": "default"
}
}
}
]
},
"email": {
"type": "string",
"format": "email",
"pattern": "(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",
"example": "jane@fake.com",
"title": "Email Address",
"description": "Raw email address. This will not be used for linking, but is available for use as an attribute in the CDE"
},
"email_sha256": {
"title": "Email Sha256",
"type": "string",
"description": "A hexadecimal string representing SHA 256 sum of a lowercased email address with trimmed whitespace. This will not be used for linking, but is available for use as an attribute in the CDE",
"example": "8b1885..."
},
"mobile": {
"title": "Mobile Phone Number",
"type": "string",
"description": "A mobile phone number including country code, no whitespace or punctuation. This will not be used for linking, but is available for use as an attribute in the CDE",
"example": "61400000000"
},
"first_name": {
"title": "First Name",
"type": "string",
"example": "Jane"
},
"last_name": {
"title": "Last Name",
"type": "string",
"example": "Doe"
},
"gender": {
"title": "Gender",
"type": "string",
"example": "Female"
},
"customer_id": {
"title": "Customer Id",
"type": "string",
"example": "b6ef3b..."
},
"date_of_birth": {
"title": "Date Of Birth",
"type": "string",
"format": "date",
"description": "an ISO8601 date string referring to the customers date of birth"
},
"country": {
"title": "Country",
"type": "string",
"example": "Australia"
},
"state": {
"title": "State",
"type": "string",
"example": "Victoria"
},
"city": {
"title": "City",
"type": "string",
"example": "St Kilda"
},
"postcode": {
"title": "Postcode",
"type": "string",
"example": "3182"
},
"zip": {
"title": "Zip",
"type": "string",
"example": "90291"
},
"employee_flag": {
"title": "Employee Flag",
"type": "boolean",
"example": false
},
"customer_type": {
"title": "Customer Type",
"type": "string",
"example": "VIP"
},
"address_1": {
"title": "Address 1",
"type": "string",
"example": "Inkerman St"
},
"address_2": {
"title": "Address 2",
"type": "string"
},
"custom_fields": {
"title": "Custom Fields",
"type": "object",
"description": "Custom Fields. Properties are open, but a dataset may be configured to accept only particular fields to facilite automated processing in the Lexer CDP.",
"example": {
"churn_risk": 0.291,
"loyalty_status": "platinum"
}
}
}
},
"minItems": 1,
"maxItems": 100
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment