CommunicationChannel

Represents a configured communication provider for message delivery (SendGrid, Twilio, Firebase, postal services). Encapsulates provider-specific configuration including credentials, sender identity, rate limits, and retry policies. Enables multi-provider strategies with delivery monitoring and default channel routing.

16 properties
Schema

Properties

PropertyTypeModeDescriptionRequired
namestring
stored

Unique identifier name for the channel (kebab-case, e.g., 'sendgrid-transactional', 'twilio-sms-us')

Example: "sendgrid-transactional"

Required
displayNamestring
stored

Human-readable name for the channel displayed in administration interfaces

Example: "SendGrid Transactional Email"

Required
typestring
stored

Communication delivery method type supported by this channel

Values: email, sms, letter, whatsapp, push, in-app, voice

Example: "email"

Required
providerstring
stored

Third-party provider or service handling message delivery (sendgrid, twilio, mailgun, aws-ses, postal-service, firebase, vonage, etc.)

Example: "sendgrid"

Required
statusstring
stored

Current operational status of the channel

Values: active, inactive, testing, deprecated

Example: "active"

Required
configurationjson
stored

Provider-specific configuration settings including API keys, endpoints, authentication tokens, sender IDs, webhook URLs, and integration parameters

Example: {"apiKey":"SG.xxx","apiEndpoint":"https://api.sendgrid.com/v3/mail/send","webhookUrl":"https://app.example.com/webhooks/sendgrid","ipPoolName":"transactional"}

Required
defaultSenderjson
stored

Default sender information used when no sender is specified in the message (name, email address, phone number, or sender ID depending on channel type)

Example: {"name":"Acme Notifications","address":"noreply@acme.com"}

Optional
rateLimitjson
stored

Rate limiting configuration to prevent exceeding provider quotas or service limits

Example: {"messagesPerMinute":100,"messagesPerHour":5000,"messagesPerDay":100000}

Optional
retryPolicyjson
stored

Retry behavior configuration for failed message delivery attempts

Example: {"maxRetries":3,"retryDelaySeconds":60,"backoffMultiplier":2}

Optional
isDefaultboolean
stored

Whether this channel is the default for its type when no specific channel is requested

Example: true

Required
supportedContentTypesstring[]
stored

Content formats supported by this channel for message body rendering

Example: ["text","html","markdown"]

Optional
maxAttachmentSizenumber
stored

Maximum attachment size in bytes allowed by this channel (primarily for email channels)

Example: 25000000

Optional
metadatajson
stored

Additional channel metadata including tags, cost tracking, geographic regions, or custom attributes

Optional
messagesSentCountnumber
calculated

Total number of messages successfully sent through this channel (calculated from message delivery records)

Example: 15420

Optional
messagesFailedCountnumber
calculated

Total number of messages that failed to send through this channel (calculated from message delivery records)

Example: 87

Optional
successRatenumber
calculated

Percentage of successfully delivered messages (messagesSentCount / (messagesSentCount + messagesFailedCount) * 100)

Example: 99.44

Optional

Examples

Example 1

{
  "@type": "CommunicationChannel",
  "name": "sendgrid-transactional",
  "displayName": "SendGrid Transactional Email",
  "type": "email",
  "provider": "sendgrid",
  "status": "active",
  "configuration": {
    "apiKey": "SG.xxxxxxxxxxxxxxxxxxxxx",
    "apiEndpoint": "https://api.sendgrid.com/v3/mail/send",
    "webhookUrl": "https://app.example.com/webhooks/sendgrid",
    "ipPoolName": "transactional",
    "trackingSettings": {
      "clickTracking": true,
      "openTracking": true
    }
  },
  "defaultSender": {
    "name": "Acme Notifications",
    "address": "noreply@acme.com"
  },
  "rateLimit": {
    "messagesPerMinute": 100,
    "messagesPerHour": 5000,
    "messagesPerDay": 100000
  },
  "retryPolicy": {
    "maxRetries": 3,
    "retryDelaySeconds": 60,
    "backoffMultiplier": 2
  },
  "isDefault": true,
  "supportedContentTypes": [
    "text",
    "html"
  ],
  "maxAttachmentSize": 25000000,
  "metadata": {
    "costPerMessage": 0.001,
    "region": "us-east-1",
    "environment": "production"
  }
}

Example 2

{
  "@type": "CommunicationChannel",
  "name": "twilio-sms-us",
  "displayName": "Twilio SMS (US)",
  "type": "sms",
  "provider": "twilio",
  "status": "active",
  "configuration": {
    "accountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "authToken": "your_auth_token_here",
    "apiEndpoint": "https://api.twilio.com/2010-04-01",
    "messagingServiceSid": "MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "statusCallbackUrl": "https://app.example.com/webhooks/twilio"
  },
  "defaultSender": {
    "phoneNumber": "+15551234567"
  },
  "rateLimit": {
    "messagesPerMinute": 60,
    "messagesPerHour": 3000,
    "messagesPerDay": 50000
  },
  "retryPolicy": {
    "maxRetries": 2,
    "retryDelaySeconds": 30,
    "backoffMultiplier": 1.5
  },
  "isDefault": true,
  "supportedContentTypes": [
    "text"
  ],
  "metadata": {
    "costPerMessage": 0.0075,
    "region": "us",
    "supportsMMS": true
  }
}

Example 3

{
  "@type": "CommunicationChannel",
  "name": "firebase-push-mobile",
  "displayName": "Firebase Cloud Messaging",
  "type": "push",
  "provider": "firebase",
  "status": "active",
  "configuration": {
    "projectId": "acme-mobile-app",
    "serviceAccountKey": "path/to/service-account-key.json",
    "apiEndpoint": "https://fcm.googleapis.com/v1/projects/acme-mobile-app/messages:send",
    "priority": "high"
  },
  "defaultSender": {
    "appId": "com.acme.mobile"
  },
  "rateLimit": {
    "messagesPerMinute": 600,
    "messagesPerHour": 30000,
    "messagesPerDay": 500000
  },
  "retryPolicy": {
    "maxRetries": 3,
    "retryDelaySeconds": 10,
    "backoffMultiplier": 2
  },
  "isDefault": true,
  "supportedContentTypes": [
    "text"
  ],
  "metadata": {
    "platforms": [
      "android",
      "ios"
    ],
    "supportsDataMessages": true,
    "supportsTopics": true
  }
}

Example 4

{
  "@type": "CommunicationChannel",
  "name": "postal-service-letters",
  "displayName": "US Postal Service Letters",
  "type": "letter",
  "provider": "lob",
  "status": "active",
  "configuration": {
    "apiKey": "live_xxxxxxxxxxxxxxxxxxxxxxxx",
    "apiEndpoint": "https://api.lob.com/v1/letters",
    "webhookUrl": "https://app.example.com/webhooks/lob",
    "mailType": "usps_first_class",
    "color": true
  },
  "defaultSender": {
    "name": "Acme Corporation",
    "addressLine1": "123 Business St",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105"
  },
  "rateLimit": {
    "messagesPerMinute": 10,
    "messagesPerHour": 500,
    "messagesPerDay": 5000
  },
  "retryPolicy": {
    "maxRetries": 1,
    "retryDelaySeconds": 300,
    "backoffMultiplier": 1
  },
  "isDefault": true,
  "supportedContentTypes": [
    "html"
  ],
  "metadata": {
    "costPerMessage": 1.23,
    "deliveryTimeEstimate": "3-5 business days",
    "supportsCertified": true
  }
}

Example 5

{
  "@type": "CommunicationChannel",
  "name": "whatsapp-business",
  "displayName": "WhatsApp Business API",
  "type": "whatsapp",
  "provider": "twilio",
  "status": "testing",
  "configuration": {
    "accountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "authToken": "your_auth_token_here",
    "apiEndpoint": "https://api.twilio.com/2010-04-01",
    "whatsappNumber": "+14155238886",
    "statusCallbackUrl": "https://app.example.com/webhooks/whatsapp"
  },
  "defaultSender": {
    "phoneNumber": "+14155238886",
    "businessName": "Acme Support"
  },
  "rateLimit": {
    "messagesPerMinute": 80,
    "messagesPerHour": 4000,
    "messagesPerDay": 80000
  },
  "retryPolicy": {
    "maxRetries": 2,
    "retryDelaySeconds": 45,
    "backoffMultiplier": 2
  },
  "isDefault": false,
  "supportedContentTypes": [
    "text",
    "markdown"
  ],
  "metadata": {
    "costPerMessage": 0.005,
    "supportsMedia": true,
    "supportsTemplates": true,
    "requiresOptIn": true
  }
}