CustomerMarketingConsent

Marketing communication consent tracking per channel for customers. Extends Consent entity with marketing-specific properties (channel, double opt-in). Supports GDPR Article 7 compliance.

Extends: Consent
38 properties
Schema

Properties

Includes inherited properties from Consent

PropertyTypeModeDescriptionRequiredSource
entityTypestring
stored

Type of entity giving consent (Customer, Patient, Employee, User, etc.)

Example: "Customer"

Required
Consent
entityIdstring
stored

Unique identifier of the entity giving consent

Example: "CUST-2024-00123"

Required
Consent
consentTypestring
enum

Category of consent being tracked

Values: marketing, privacy_policy, terms_of_service, data_processing, cookies, analytics, medical_treatment, data_sharing, research, third_party_sharing

Example: "marketing"

Required
Consent
grantedboolean
stored

Whether consent is currently granted (true) or withdrawn (false)

Example: true

Required
Consent
grantedAtDateTime
stored

Timestamp when consent was granted

Example: "2024-01-15T10:30:00Z"

Optional
Consent
grantedIpstring
stored

IP address from which consent was granted (GDPR Article 7 proof requirement)

Example: "192.168.1.100"

Optional
Consent
grantedByUser
stored

User who granted consent (if obtained by staff on behalf of entity)

Example: {"@type":"User","userId":"support_042"}

Optional
Consent
consentSourcestring
enum

Source or method through which consent was obtained

Values: web_form, mobile_app, api, customer_service, in_person, email, phone, import, manual

Example: "web_form"

Optional
Consent
withdrawnAtDateTime
stored

Timestamp when consent was withdrawn

Example: "2024-06-15T14:20:00Z"

Optional
Consent
withdrawnIpstring
stored

IP address from which consent was withdrawn

Example: "192.168.1.105"

Optional
Consent
withdrawnByUser
stored

User who withdrew consent (if withdrawn by staff)

Optional
Consent
withdrawalReasonstring
stored

Reason provided for consent withdrawal

Example: "No longer interested"

Optional
Consent
consentVersionstring
stored

Version of the consent form, policy, or terms under which consent was given

Example: "2.1"

Optional
Consent
languageLanguage
stored

Language in which consent was presented and obtained

Optional
Consent
expiresAtDateTime
stored

Optional expiration date for time-limited consents

Example: "2025-01-15T00:00:00Z"

Optional
Consent
metadataobject
stored

Additional consent-specific metadata (form ID, document URL, etc.)

Example: {"formId":"consent_form_v2.1","documentUrl":"https://example.com/privacy-policy-v2.1.pdf"}

Optional
Consent
customerCustomer
stored

Reference to the customer who granted or withdrew consent (specialization of entityType/entityId from Consent)

Required
CustomerMarketingConsent
channelstring
enum

Marketing communication channel for which consent applies

Values: email, sms, phone, mail, push, whatsapp, social_media

Example: "email"

Required
CustomerMarketingConsent
doubleOptInboolean
stored

Whether double opt-in confirmation was completed (email verification link clicked)

Example: true

Optional
CustomerMarketingConsent
doubleOptInConfirmedAtDateTime
stored

Timestamp when double opt-in was confirmed

Example: "2024-01-15T10:35:00Z"

Optional
CustomerMarketingConsent
unsubscribeTokenstring
stored

Unique token for one-click unsubscribe functionality

Example: "unsub_a1b2c3d4e5f6g7h8"

Optional
CustomerMarketingConsent
campaignTypestring
enum

Type of marketing campaign this consent covers

Values: promotional, transactional, newsletter, product_updates, events, surveys

Example: "promotional"

Optional
CustomerMarketingConsent

Examples

Example 1

{
  "@type": "CustomerMarketingConsent",
  "customer": {
    "@type": "Customer",
    "customerNumber": "CUST-2024-00123"
  },
  "channel": "email",
  "granted": true,
  "grantedAt": "2024-01-15T10:30:00Z",
  "grantedIp": "192.168.1.100",
  "consentSource": "registration_form",
  "consentVersion": "2.1",
  "language": {
    "@type": "Language",
    "code": "en",
    "name": "English"
  },
  "doubleOptIn": true,
  "doubleOptInConfirmedAt": "2024-01-15T10:35:00Z"
}

Example 2

{
  "@type": "CustomerMarketingConsent",
  "customer": {
    "@type": "Customer",
    "customerNumber": "CUST-2024-00123"
  },
  "channel": "sms",
  "granted": false,
  "withdrawnAt": "2024-06-15T14:20:00Z",
  "withdrawnIp": "192.168.1.105",
  "withdrawalReason": "Too many promotional messages",
  "consentVersion": "2.1"
}

Example 3

{
  "@type": "CustomerMarketingConsent",
  "customer": {
    "@type": "Customer",
    "customerNumber": "CUST-2024-00789"
  },
  "channel": "email",
  "granted": true,
  "grantedAt": "2023-06-10T15:00:00Z",
  "grantedIp": "203.0.113.50",
  "consentSource": "checkout",
  "consentVersion": "2.0",
  "language": {
    "@type": "Language",
    "code": "en",
    "name": "English"
  },
  "doubleOptIn": true,
  "doubleOptInConfirmedAt": "2023-06-10T15:05:00Z"
}

Example 4

{
  "@type": "CustomerMarketingConsent",
  "customer": {
    "@type": "Customer",
    "customerNumber": "CLIENT-2024-00456"
  },
  "channel": "whatsapp",
  "granted": true,
  "grantedAt": "2024-03-10T12:00:00Z",
  "grantedIp": "89.156.23.45",
  "consentSource": "preference_center",
  "consentVersion": "2.1",
  "language": {
    "@type": "Language",
    "code": "fr",
    "name": "Français"
  },
  "doubleOptIn": false
}

Example 5

{
  "@type": "CustomerMarketingConsent",
  "customer": {
    "@type": "Customer",
    "customerNumber": "CUST-2024-00789"
  },
  "channel": "phone",
  "granted": true,
  "grantedAt": "2023-06-10T15:00:00Z",
  "grantedIp": "203.0.113.50",
  "consentSource": "customer_service",
  "consentVersion": "2.0",
  "language": {
    "@type": "Language",
    "code": "en",
    "name": "English"
  }
}