The DecisionPointItem activity type
The DecisionPointItem
activity type helps define the logic when Marketing Automation enrolls contacts into campaigns.
You use the DecisionPointItem
activity type to move the contact through different marketing actions without waiting for contact interaction. For example, if a contact is registered as a top-100 customer, you can choose to proceed along the Yes path and show a particular offer. If the customer is not a top-100 customer, you can proceed along the No path.
Item structure
The DecisionPointItem activity type contains the following structure:
Properties
The DecisionPointItem activity type has the following properties:
Ingoing paths |
1 |
Outgoing paths |
2 |
Title and subtitle |
Displayed in a tool tip when the activity type is defined. Not available in markup. |
Logic positions |
Under the outgoing paths of other |
The item icon turns into a diamond shape when you define its parameters.
Supported CSS classes
The DecisionPointItem activity type supports the following CSS classes:
CSS class |
Undefined |
Defined |
---|---|---|
|
|
|
Sample TypeScript implementation
This is a sample implementation of the DecisionPointItem activity type:
sample/src/sample-decision-point-item-activity-type.ts
import { DecisionPointItem } from '@sitecore/ma-core';
export class SampleDecisionPointItemActivityType extends DecisionPointItem {
getVisual(): string {
const subTitle = this.isDefined ? 'Count: ' + this.editorParams.count : '';
const cssClass = this.isDefined ? '' : 'undefined';
// The CSS class can only be decision-point.
return `
<div class="decision-point ${cssClass}" title="Sample decision point item">
<span class="icon">
<img src="/~/icon/OfficeWhite/32x32/gearwheels.png" />
</span>
</div>
`;
}
get isDefined(): boolean {
/*
The editorParams property value is the object that is serialized from the activity editor.
If the activity is undefined, the editorParams property will evaluate to {}.
*/
return Boolean(this.editorParams.count);
}
}