Dynamic Content

Use lead segmentations to provide dynamic content in these asset types:

  • Emails
  • Landing Pages
  • Snippets

Overview

Dynamic content operates at the section level. Each section can provide variations for segments in a selected segmentation.

When a lead views the asset, Marketo displays the variation for the lead’s segment. If the lead does not qualify for a segment, Marketo displays the default content.

Example

This example uses a Region (US) segmentation to display an event promotion to leads in the Southwest segment. The segment includes leads from California, Nevada, Utah, Colorado, Arizona, and New Mexico.

Use the Update Email Content Section endpoint to change the editable section with ID Q1-promotion-banner to a DynamicContent section. The value parameter specifies the segmentation ID.

Emails and landing pages follow this pattern. Snippets use the different pattern described in the Snippets API documentation.

The following example sets the section to be a Dynamic Content section, segmented by segmentation 1001.

POST /rest/asset/v1/email/{id}/content/Q1-promotion-banner.json
type=DynamicContent&value=1001
{
  "success": true,
  "errors": [],
  "requestId": "891b#1729b34b9a5",
  "warnings": [],
  "result": [
    {
      "id": 1909
    }
  ]
}

Call the Update Email Dynamic Content Section endpoint to add content for a segment in a specific section.

The following request displays a special banner instead of the default content for leads in the Southwest segment. To create more variations, call the endpoint for each segment and section.

POST /rest/asset/v1/email/{id}/dynamicContent/{dynamicContentId}.json
segment=Southwest&type=HTML&value=<img src='//www.example.com/SuperSpecialBannerForAmericanSouthwestLeads.jpg'/>
{
  "success": true,
  "errors": [],
  "requestId": "891b#1729b34b9a5",
  "warnings": [],
  "result": [
    {
      "id": 1637
    }
  ]
}

Segmentation

A segmentation is a user-defined list of rule sets that Marketo evaluates from top to bottom against the lead database. A lead can belong to only one segment in each segmentation. The lead joins the first segment for which it qualifies.

If the lead does not qualify for another segment, it joins the Default segment and receives the segmentation’s default content.

List

Use the list endpoint to retrieve available segmentations.

GET /rest/asset/v1/segmentation.json
{
  "success": true,
  "warnings": [ ],
  "errors": [ ],
  "requestId": "78eb#14e9de95868",
  "result": [
    {
      "id": 1001,
      "name": "My Industry Segmentation",
      "description": "",
      "createdAt": "2015-04-06T18:23:32Z+0000",
      "updatedAt": "2015-04-06T18:37:10Z+0000",
      "url": "https://app-abm.marketo.com/#SG1001A1",
      "folder": {
        "type": "Program",
        "value": 396,
        "folderName": null
      },
      "status": "approved",
      "workspace": "Default"
    },
    {
      "id": 1002,
      "name": "My Country Segmentation",
      "description": "",
      "createdAt": "2015-04-06T18:28:23Z+0000",
      "updatedAt": "2015-04-06T18:37:18Z+0000",
      "url": "https://app-abm.marketo.com/#SG1002A1",
      "folder": {
        "type": "Program",
        "value": 396,
        "folderName": null
      },
      "status": "approved",
      "workspace": "Default"
    }
  ]
}

Use the segments endpoint to retrieve the segments in a parent segmentation.

GET /rest/asset/v1/segmentation/1001/segments.json
{
  "success": true,
  "warnings": [ ],
  "errors": [ ],
  "requestId": "2031#14e9df08796",
  "result": [
    {
      "id": 1001,
      "name": "Manufacturing",
      "description": null,
      "createdAt": "2015-04-06T18:23:32Z+0000",
      "updatedAt": "2015-04-06T18:37:09Z+0000",
      "status": "approved",
      "segmentationId": 1001
    },
    {
      "id": 1002,
      "name": "Healthcare",
      "description": null,
      "createdAt": "2015-04-06T18:23:32Z+0000",
      "updatedAt": "2015-04-06T18:37:09Z+0000",
      "url": "https://app-abm.marketo.com/#SL769688A1",
      "status": "approved",
      "segmentationId": 1001
    },
    {
      "id": 1003,
      "name": "Financial",
      "description": null,
      "createdAt": "2015-04-06T18:23:32Z+0000",
      "updatedAt": "2015-04-06T18:37:09Z+0000",
      "url": "https://app-abm.marketo.com/#SL769690A1",
      "status": "approved",
      "segmentationId": 1001
    },
    {
      "id": 1004,
      "name": "Technology",
      "description": null,
      "createdAt": "2015-04-06T18:23:32Z+0000",
      "updatedAt": "2015-04-06T18:37:09Z+0000",
      "url": "https://app-abm.marketo.com/#SL769692A1",
      "status": "approved",
      "segmentationId": 1001
    },
    {
      "id": 1005,
      "name": "Default",
      "description": null,
      "createdAt": "2015-04-06T18:23:32Z+0000",
      "updatedAt": "2015-04-06T18:37:09Z+0000",
      "url": "https://app-abm.marketo.com/#SL769694A1",
      "status": "approved",
      "segmentationId": 1001
    }
  ]
}
recommendation-more-help
marketo-developer-help