Action that updates the statistics for an email campaign when the delivery status of emails changes.

function  CRM_Marketing_ParseWebhookRequest(request: FetchRequest):  CRM_Marketing_WebhookResult {
    const stats: CRM_Marketing_CampaignStats  = {}; 
    ... 
    // Event from the email service indicating that an email  has been sent 
    stats.sent++; 
    ... 
    // Event from the email  service indicating a click on a link in the email 
    stats.clicked++; 
     ... 
    return { 
        actions: [ 
            // Updated the campaign  statistics with identifier '1000' 
            { 
                type:  CRM_Marketing_ActionType.UpdateCampaignStats, 
                externalId:  '1000', 
                statistics: stats, 
            }, 
        ]; 
     } 
} 

Hierarchy

  • CRM_Marketing_UpdateCampaignStatsAction

Properties

externalId

externalId: string

ID of the email campaign in the email marketing service.

statistics

Email campaign statistics.

type

Action type.