Skip to main content

Labeling Campaign Orders for Filtering

Version 1.3 introduced ability to label campaign objects before order is placed so that later campaigns list can be queried with those labels.

Let's say that you want to group campaigns, you can do:

window.hapi.campaign.state.campaignForm = window.hapiUtils.mergeDeepOverwriteArrays(
window.hapi.campaign.state.campaignForm.value,
{
labels: {
group: "some-identifier-for-group"
}
}
)

When user places an order, this order will have the label prefilled on campaignForm object.


You can then use the new widget to query list of campaigns with the labels (up to 5 maximum) you provided

<he-campaign-list-layout-card-labels label1-key="group" label1-value="some-identifier-for-group"></he-campaign-list-layout-card-labels>