Multiple Campaigns

Examples of supporting multiple campaigns from a single API call.

This example demonstrates the inclusion of multiple campaigns within a single API request. The API groups campaign entries by the requested campaign name and optionally the campaign version to utilize different sendouts for each combination.

Each campaign entry object should be using a consistent structure, encompassing key details for the campaign configuration:

  1. Sendout A:

    • Campaign Name: "campaign_A"

    • Campaign Version: "v1.0"

    All entries using the above information will be sent as part of the sendout corresponding to the version "v1.0" of campaign A.

  2. Sendout B:

    • Campaign Name: "campaign_A"

    All entries using the above information will be sent as part of a new sendout or the latest active sendout on campaign A.

  3. Sendout C:

    • Campaign Name: "campaign_B"

    • Campaign Version: v1.0

    All entries using the above information will be sent as part of the sendout corresponding to the version "v1.0" of campaign B

The array structure allows for the inclusion of various campaigns in a cohesive and organized manner within a single API request.

"entries": [
    {
      "client": "+14155558234",
      "campaignName": "campaign_A",
      "campaignVersion": "v1.0",
      "variables": {"key1": "value1", "key2": "value2"},
    },
    {
      "client": "+14155559345",
      "campaignName": "campaign_A",
      "variables": {"key1": "value3", "key2": "value4"},
    },
    {
      "client": "+14155550456",
      "campaignName": "campaign_B",
      "campaignVersion": "v1.0",
      "variables": {"Date": "value5", "Name": "value6","Price":"value7"},
    }
  ]

Explanation:

  1. Entry for Campaign A:

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

    • campaignName: The identifier of the campaign (campaign_A).

    • campaignVersion: Identifier of the campaign version (v1.0).

    • variables: JSON object describing flow variables and substituted values (key1, key2).

  2. Entry for Campaign B:

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

    • campaignName: The identifier of the campaign (campaign_A).

    • variables: JSON object describing flow variables and substituted values (key1, key2).

  3. Entry for Campaign C:

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

    • campaignName: The identifier of the campaign (campaign_B).

    • variables: JSON object describing flow variables and substituted values (Date, Name, Price).

    • campaignVersion: Identifier of the campaign version (v1.0).

Last updated