Create Discount
Definition
Create various kinds of discounts.
This activity is used when you want to make offers to customers.
We provided all the required properties in this activity so you can generate every kind of discount.
You can create a personalized discount for a specific customer or you can also create one discount for all of the customers. In some of our built-in workflows such as Wishlist Marketing, this activity is used.
tip
You can generate random coupon code with javascript. An example of this can be found in the Birthday Emails workflow.
Properties
Property | Description |
---|---|
Discount Name | The name of the discount. |
Discount Type | Type of the discount. |
Assigned to IDs | Products/Categories/Manufacturers comma seperated IDs. |
Use Percentage | Whether use percentage. |
Discount Percentage | Discount percentage value (used with "UsePercentage"). |
Maximum Discount Amount | The maximum discount amount (used with "UsePercentage"). |
Discount Amount | The amount of the discount. |
Requires Coupon Code | Whether discount requires coupon code. |
Coupon Code | The discount coupon code. |
Start Date UTC | Discount start date (UTC). |
End Date UTC | Discount end date (UTC). |
Is Cumulative | Whether discount can be used simultaneously with other discounts (with the same discount type). |
Discount Limitation | Limitaion type of the discount. |
Limitation Times | The discount limitation times (used when Limitation is set to "N Times Only" or "N Times Per Customer"). |
Maximum Discounted Quantity | The maximum product quantity which could be discounted Used with "Assigned to products" or "Assigned to categories" type. |
Outcomes
Outcome | Description |
---|---|
Done | Returns the output model. |
Output Model
{
Name: string,
DiscountType: number // AssignedToOrderTotal = 1, AssignedToSkus = 2, AssignedToCategories = 5, AssignedToManufacturers = 6, AssignedToShipping = 10, AssignedToOrderSubTotal = 20,
UsePercentage: boolean,
DiscountPercentage: number,
DiscountAmount: number,
MaximumDiscountAmount?: number,
StartDateUtc?: Date,
EndDateUtc?: Date,
RequiresCouponCode: boolean,
CouponCode: string,
IsCumulative: boolean,
DiscountLimitationId: number,
LimitationTimes: number,
MaximumDiscountedQuantity?: number,
AppliedToSubCategories: boolean,
DiscountLimitationType: number, // Unlimited = 0, NTimesOnly = 15, NTimesPerCustomer = 25
AppliedToProductIds: number[]
}