Campaign Entry

Examples of populating the different campaign entry information.

Entry Tips

  • Ensure each entry in the "entries" array contains valid and unique combinations of client and campaignName/campaignVersion. (see Multiple campaigns if your intent is to broadcast multiple sendouts from the same API call)

  • Use the "variables" field to customize campaign content or behavior.

  • Campaigns must have been finalized from the Connectly UI for successful execution.

  • [Alpha] Schedule individual (or all) entries for the future using the "scheduledAt" field, adhering to the ISO 8601 format.

Basic entry

This example represents the minimal setup of campaign entry with only the required fields for a campaign that doesn't use any variables.

{
  "client": "+16505551236",
  "campaignName": "campaign_basic"
}

Explanation:

  • client: The identifier of the customer who will receive the campaign (required).

  • campaignName: The identifier of the campaign this entry is part of (required).

Entry with variables

This example includes variables for customizing the campaign experience per client. Variables are configured for each campaign from the Connectly UI.

{
  "client": "+16505551237",
  "campaignName": "campaign_with_variables",
  "variables": {
    "username": "JaneDoe",
    "product": "Smart Watch"
  }
}

Explanation:

  • client: The identifier of the customer who will receive the campaign (required).

  • campaignName: The identifier of the campaign this entry is part of (required).

  • variables: JSON object describing flow variables and substituted values.

[Alpha] Entry with Scheduled Time

NOTE: This option is not publicly available yet for all accounts.

This example schedules the specific entry for execution around a specific time.

{
  "client": "+16505551238",
  "campaignName": "campaign_scheduled",
  "scheduledAt": "2023-12-07T08:00:00Z"
}

Explanation:

  • client: The identifier of the customer who will receive the campaign (required).

  • campaignName: The identifier of the campaign this entry is part of (required).

  • scheduledAt: Timestamp indicating when the campaign entry should be executed (optional).

[Alpha] Entry with Sender and Variables

NOTE: This option is not publicly available yet for all accounts.

This example specifies the sender phone for businesses that have multiple phone numbers registered with Connectly AI.

{
  "sender": "+14155551234",
  "client": "+16505551239",
  "campaignName": "campaign_sender_variables",
  "variables": {
    "user": "Alice",
    "item": "Virtual Reality headset"
  }
}

Explanation:

  • sender: Identifier of the business channel the campaign will be sent from (optional).

  • client: The identifier of the customer who will receive the campaign (required).

  • campaignName: The identifier of the campaign this entry is part of (required).

  • variables: JSON object describing flow variables and substituted values.

[Alpha] Entry with Campaign Version and Scheduled Time

NOTE: This option is not publicly available yet for all accounts.

This example includes both the campaign version and a scheduled time.

{
  "client": "+16505551240",
  "campaignName": "campaign_version_scheduled",
  "campaignVersion": "v2.0",
  "scheduledAt": "2023-12-10T15:30:00Z"
}

Explanation:

  • client: The identifier of the customer who will receive the campaign (required).

  • campaignName: The identifier of the campaign this entry is part of (required).

  • campaignVersion: Identifier of the campaign version (optional).

  • scheduledAt: Timestamp indicating when the campaign entry should be executed (optional).

Last updated