Skip to content

CampaignAsset

Source code in docs_src/capo_partnercentral_marketing/types/campaign_asset.py
class CampaignAsset(TypedDict, closed=True):
    id: "capo_partnercentral_marketing.types.campaign_asset_id.CampaignAssetId"
    """The asset identifier."""
    campaign_id: "capo_partnercentral_marketing.types.campaign_id.CampaignId"
    """The campaign identifier."""
    category: "capo_partnercentral_marketing.types.campaign_asset_category.CampaignAssetCategory"
    """The asset category."""
    name: "capo_partnercentral_marketing.types.asset_name.AssetName"
    """The display name."""
    link_label: NotRequired["capo_partnercentral_marketing.types.link_label.LinkLabel"]
    """DOCUMENT only: the words a page uses for this document, such as "eBook". Fill an `AssetLink` field's `LabelFieldId` with it when the partner picks this asset."""
    state: "capo_partnercentral_marketing.types.campaign_asset_state.CampaignAssetState"
    """Whether the asset is live. Reports current truth only, and nothing else on this shape overrides it. During an *initial* publication it stays INACTIVE until the delivery platform holds the object; during a *re*-publication it stays ACTIVE, because the previously published content is still serving. A stopped asset and one never started both read INACTIVE; `LastActivationStatus` tells them apart, because a stop does not change how the last activation went — stopped is INACTIVE with that member `SUCCEEDED`, never started is INACTIVE with it absent. An update never moves this member."""
    last_activation_status: NotRequired[
        "capo_partnercentral_marketing.types.attempt_status.AttemptStatus"
    ]
    """How the most recent hand-over to the delivery platform ended. The hand-over, not the delivery: if DG got the artifact scheduled at the platform this is SUCCEEDED, and whether the platform then delivered is `DeliveryStatus`. Per category the hand-over point is — email: the mailing armed; social: the create, which *is* the schedule; landing page: create plus publish-personalisation; document: bytes written. Read with `State` this is what separates a stopped asset (INACTIVE with SUCCEEDED here) from one never activated (INACTIVE with this member absent) — a stop does not change how the last *activation* went. There is no public UNKNOWN. A hand-over whose outcome DG cannot yet determine reports IN_PROGRESS, because a partner's action is identical either way and there is nothing to do with "unknown". Reporting it as FAILED would be the harmful collapse: that reads as safe to retry, and a retry on an at-most-once create publishes a second live object. Omitted before the first activation attempt."""
    delivery_status: NotRequired[
        "capo_partnercentral_marketing.types.delivery_status.DeliveryStatus"
    ]
    """What the platform did with the artifact after accepting it. EMAIL and SOCIAL_POST only — absent on every other category, which has no delivery event. See the DeliveryStatus docs."""
    delivery_status_reason: NotRequired[
        "capo_partnercentral_marketing.types.campaign_asset_state_reason.CampaignAssetStateReason"
    ]
    """Why delivery failed. Present only when DeliveryStatus is FAILED. For an email the platform rejected: SENDER_EMAIL_INVALID, RECIPIENT_LIST_EMPTY, MAILING_CREDITS_EXHAUSTED or RECIPIENT_LIMIT_EXCEEDED. Otherwise DELIVERY_FAILED. A Facebook post refused because its connection has no Page is FAILED with SOCIAL_CONNECTION_PAGE_REQUIRED, and withdrawn: reconnect Facebook with a Page selected. A social post the platform stopped retrying, because it could not publish within 12 hours of its scheduled time, is FAILED with DELIVERY_FAILED. Any other social post that could not be published stays PENDING while it is investigated, and is reported FAILED with DELIVERY_FAILED once it is confirmed it will not go out. Deactivate and activate the asset again to retry."""
    source_asset_template_id: NotRequired["capo_partnercentral_marketing.types.id.Id"]
    """The asset template this asset was created from: the `SourceAssetTemplateIdentifier` its `BatchCreateCampaignAsset` entry named, one of `GetCampaignTemplate`'s `CampaignTemplate.AssetTemplates[].Id`. Set at create and never writable. Absent on an asset created before DG recorded it, which can't be activated either. A campaign holds at most one asset per asset template, so this is how a client matches a campaign's assets to its template's asset templates, for example to create the same assets in another campaign. Names don't identify one: two asset templates can share a name."""
    social_platform: NotRequired[
        "capo_partnercentral_marketing.types.platform.Platform"
    ]
    """SOCIAL_POST only: the platform the post goes to, set from its template and never writable. The same value `CampaignAssetSummary.SocialPlatform` reports. Absent for every other category."""
    file_format: NotRequired[
        "capo_partnercentral_marketing.types.file_format.FileFormat"
    ]
    """Concrete file format of the finished artifact. For `DOWNLOAD_ONLY` this is the format of the object export copies through verbatim."""
    send_mode: NotRequired["capo_partnercentral_marketing.types.send_mode.SendMode"]
    """When this asset sends, as chosen with UpdateCampaignAsset. `EMAIL` and `SOCIAL_POST` only — the two categories whose delivery platform holds a schedule of its own. Absent until chosen, and then the asset reports `SEND_MODE_MISSING`."""
    scheduled_send_at: NotRequired[
        "capo_partnercentral_marketing.types.timestamp.Timestamp"
    ]
    """The send time, present only when `SendMode` is `SCHEDULED`. It reaches the delivery platform at the asset's next activation. Was `scheduleDate: UtcDate`; retyped with the write member of the same name."""
    field_values: NotRequired[
        "capo_partnercentral_marketing.types.campaign_asset_field_value_list.CampaignAssetFieldValueList"
    ]
    """The asset's pinned template fields — the field schema copied from the blueprint at instantiation, each paired with the partner's current value. Present on every asset instantiated from a blueprint that offers editable fields, whatever its category (design section 3.1); absent on one whose blueprint offers none."""
    layout_previews: NotRequired[
        "capo_partnercentral_marketing.types.layout_preview_list.LayoutPreviewList"
    ]
    """The asset's AWS-authored layout, as stable public CDN URLs composed from the fileKeys copied off the blueprint at instantiation. Together with FieldValues this makes the asset self-describing: a client renders the edit form and shows the real layout while editing, with no template lookup. The stored form is a bare object key and the URL is composed on read. The key is revision-addressed and prior revisions are retained, so the key IS the pin — nothing is copied into the asset bucket, and there is no version parameter to carry (DG-038). One entry for every category except LANDING_PAGE, which has two and distinguishes them with PageType. On a multi-layout asset, the SELECTED option's pages only (its first option when none is stored); each option's own previews are on layout.options."""
    layout: NotRequired[
        "capo_partnercentral_marketing.types.campaign_asset_layout.CampaignAssetLayout"
    ]
    """A multi-layout asset's layout choice (DG-044): the selection once made, and every option the asset was created with. Absent for a single-layout asset. FieldValues is always the union of every option's fields, selected or not, so a client can switch layouts without a round trip: each option lists its own FieldIds. The selection drives layout.selected and the top-level LayoutPreviews only."""
    activation_issues: (
        "capo_partnercentral_marketing.types.activation_issue_list.ActivationIssueList"
    )
    """What must be fixed on this asset before it can be activated. Empty when the asset is ready. Issues don't block saving: an asset can be saved incomplete and fixed over several updates. `StartCampaignAssetActivationTask` refuses an asset that still has issues: an issue blocks activation when only an edit to the asset can change the outcome. Most issues name the field to fix in `FieldId`. Fix it with `UpdateCampaignAsset`, then read this list again. Besides the issues computed from the asset's content, the list carries what the last activation found: `CONTENT_REJECTED` and `PARTNER_IMAGE_REJECTED` when moderation refused a field. Editing that field removes its issue. A `CONTENT_REJECTED` without a `FieldId` means the text was refused as a whole; editing any text field removes it. Problems with the campaign's own settings, such as a missing recipient list, and with the partner's profile, such as a missing logo, are reported on `Campaign.ActivationIssues`, not here."""
    public_url: NotRequired["capo_partnercentral_marketing.types.public_url.PublicUrl"]
    """The live public address this asset's activation produced. A landing page's page URL, read back from the delivery platform at activation and preserved across every convergence; a document's public CDN URL, composed on read from the key the publish wrote. Absent until the asset activates, and absent for EMAIL and SOCIAL_POST, which produce no partner-addressable URL of their own. For a landing page this is the entire deliverable — without it a partner has no way to learn where their live page is. A WIDGET landing page reports none: it is embedded rather than standalone, so absence there is expected rather than a fault."""
    created_at: NotRequired["capo_partnercentral_marketing.types.timestamp.Timestamp"]
    """Creation timestamp."""
    updated_at: NotRequired["capo_partnercentral_marketing.types.timestamp.Timestamp"]
    """Last update timestamp."""

activation_issues instance-attribute

activation_issues: ActivationIssueList

What must be fixed on this asset before it can be activated. Empty when the asset is ready. Issues don't block saving: an asset can be saved incomplete and fixed over several updates. StartCampaignAssetActivationTask refuses an asset that still has issues: an issue blocks activation when only an edit to the asset can change the outcome. Most issues name the field to fix in FieldId. Fix it with UpdateCampaignAsset, then read this list again. Besides the issues computed from the asset's content, the list carries what the last activation found: CONTENT_REJECTED and PARTNER_IMAGE_REJECTED when moderation refused a field. Editing that field removes its issue. A CONTENT_REJECTED without a FieldId means the text was refused as a whole; editing any text field removes it. Problems with the campaign's own settings, such as a missing recipient list, and with the partner's profile, such as a missing logo, are reported on Campaign.ActivationIssues, not here.

campaign_id instance-attribute

campaign_id: CampaignId

The campaign identifier.

category instance-attribute

The asset category.

created_at instance-attribute

created_at: NotRequired[Timestamp]

Creation timestamp.

delivery_status instance-attribute

delivery_status: NotRequired[DeliveryStatus]

What the platform did with the artifact after accepting it. EMAIL and SOCIAL_POST only — absent on every other category, which has no delivery event. See the DeliveryStatus docs.

delivery_status_reason instance-attribute

delivery_status_reason: NotRequired[CampaignAssetStateReason]

Why delivery failed. Present only when DeliveryStatus is FAILED. For an email the platform rejected: SENDER_EMAIL_INVALID, RECIPIENT_LIST_EMPTY, MAILING_CREDITS_EXHAUSTED or RECIPIENT_LIMIT_EXCEEDED. Otherwise DELIVERY_FAILED. A Facebook post refused because its connection has no Page is FAILED with SOCIAL_CONNECTION_PAGE_REQUIRED, and withdrawn: reconnect Facebook with a Page selected. A social post the platform stopped retrying, because it could not publish within 12 hours of its scheduled time, is FAILED with DELIVERY_FAILED. Any other social post that could not be published stays PENDING while it is investigated, and is reported FAILED with DELIVERY_FAILED once it is confirmed it will not go out. Deactivate and activate the asset again to retry.

field_values instance-attribute

field_values: NotRequired[CampaignAssetFieldValueList]

The asset's pinned template fields — the field schema copied from the blueprint at instantiation, each paired with the partner's current value. Present on every asset instantiated from a blueprint that offers editable fields, whatever its category (design section 3.1); absent on one whose blueprint offers none.

file_format instance-attribute

file_format: NotRequired[FileFormat]

Concrete file format of the finished artifact. For DOWNLOAD_ONLY this is the format of the object export copies through verbatim.

id instance-attribute

The asset identifier.

last_activation_status instance-attribute

last_activation_status: NotRequired[AttemptStatus]

How the most recent hand-over to the delivery platform ended. The hand-over, not the delivery: if DG got the artifact scheduled at the platform this is SUCCEEDED, and whether the platform then delivered is DeliveryStatus. Per category the hand-over point is — email: the mailing armed; social: the create, which is the schedule; landing page: create plus publish-personalisation; document: bytes written. Read with State this is what separates a stopped asset (INACTIVE with SUCCEEDED here) from one never activated (INACTIVE with this member absent) — a stop does not change how the last activation went. There is no public UNKNOWN. A hand-over whose outcome DG cannot yet determine reports IN_PROGRESS, because a partner's action is identical either way and there is nothing to do with "unknown". Reporting it as FAILED would be the harmful collapse: that reads as safe to retry, and a retry on an at-most-once create publishes a second live object. Omitted before the first activation attempt.

layout instance-attribute

layout: NotRequired[CampaignAssetLayout]

A multi-layout asset's layout choice (DG-044): the selection once made, and every option the asset was created with. Absent for a single-layout asset. FieldValues is always the union of every option's fields, selected or not, so a client can switch layouts without a round trip: each option lists its own FieldIds. The selection drives layout.selected and the top-level LayoutPreviews only.

layout_previews instance-attribute

layout_previews: NotRequired[LayoutPreviewList]

The asset's AWS-authored layout, as stable public CDN URLs composed from the fileKeys copied off the blueprint at instantiation. Together with FieldValues this makes the asset self-describing: a client renders the edit form and shows the real layout while editing, with no template lookup. The stored form is a bare object key and the URL is composed on read. The key is revision-addressed and prior revisions are retained, so the key IS the pin — nothing is copied into the asset bucket, and there is no version parameter to carry (DG-038). One entry for every category except LANDING_PAGE, which has two and distinguishes them with PageType. On a multi-layout asset, the SELECTED option's pages only (its first option when none is stored); each option's own previews are on layout.options.

link_label: NotRequired[LinkLabel]

DOCUMENT only: the words a page uses for this document, such as "eBook". Fill an AssetLink field's LabelFieldId with it when the partner picks this asset.

name instance-attribute

name: AssetName

The display name.

public_url instance-attribute

public_url: NotRequired[PublicUrl]

The live public address this asset's activation produced. A landing page's page URL, read back from the delivery platform at activation and preserved across every convergence; a document's public CDN URL, composed on read from the key the publish wrote. Absent until the asset activates, and absent for EMAIL and SOCIAL_POST, which produce no partner-addressable URL of their own. For a landing page this is the entire deliverable — without it a partner has no way to learn where their live page is. A WIDGET landing page reports none: it is embedded rather than standalone, so absence there is expected rather than a fault.

scheduled_send_at instance-attribute

scheduled_send_at: NotRequired[Timestamp]

The send time, present only when SendMode is SCHEDULED. It reaches the delivery platform at the asset's next activation. Was scheduleDate: UtcDate; retyped with the write member of the same name.

send_mode instance-attribute

send_mode: NotRequired[SendMode]

When this asset sends, as chosen with UpdateCampaignAsset. EMAIL and SOCIAL_POST only — the two categories whose delivery platform holds a schedule of its own. Absent until chosen, and then the asset reports SEND_MODE_MISSING.

social_platform instance-attribute

social_platform: NotRequired[Platform]

SOCIAL_POST only: the platform the post goes to, set from its template and never writable. The same value CampaignAssetSummary.SocialPlatform reports. Absent for every other category.

source_asset_template_id instance-attribute

source_asset_template_id: NotRequired[Id]

The asset template this asset was created from: the SourceAssetTemplateIdentifier its BatchCreateCampaignAsset entry named, one of GetCampaignTemplate's CampaignTemplate.AssetTemplates[].Id. Set at create and never writable. Absent on an asset created before DG recorded it, which can't be activated either. A campaign holds at most one asset per asset template, so this is how a client matches a campaign's assets to its template's asset templates, for example to create the same assets in another campaign. Names don't identify one: two asset templates can share a name.

state instance-attribute

Whether the asset is live. Reports current truth only, and nothing else on this shape overrides it. During an initial publication it stays INACTIVE until the delivery platform holds the object; during a re-publication it stays ACTIVE, because the previously published content is still serving. A stopped asset and one never started both read INACTIVE; LastActivationStatus tells them apart, because a stop does not change how the last activation went — stopped is INACTIVE with that member SUCCEEDED, never started is INACTIVE with it absent. An update never moves this member.

updated_at instance-attribute

updated_at: NotRequired[Timestamp]

Last update timestamp.