Hello team. I am trying to add the following cart discount with target type "totalPrice":
resource "commercetools_cart_discount" "discount" {
name = {
en = "Discount"
}
description = {
en = "Discount"
}
value {
type = "relative"
permyriad = 10000
}
predicate = "custom.orderHeaderKey is defined"
target {
type = "totalPrice"
}
sort_order = "0.5"
}
I get this error when deploying:
Error: "totalPrice" not a valid value for "target.0.type"
I'm not sure if it is a recent addition but according to the CommerceTools docs https://docs.commercetools.com/api/projects/cartDiscounts#cartdiscounttarget, cart totalPrice is a supported target. I also tried manually creating this cart discount in the CommerceTools UI then queried for it, and the target is returned as:
Hello team. I am trying to add the following cart discount with target type "totalPrice":
resource "commercetools_cart_discount" "discount" { name = { en = "Discount" } description = { en = "Discount" } value { type = "relative" permyriad = 10000 } predicate = "custom.orderHeaderKey is defined" target { type = "totalPrice" } sort_order = "0.5" }
I get this error when deploying:
Error: "totalPrice" not a valid value for "target.0.type"
I'm not sure if it is a recent addition but according to the CommerceTools docs https://docs.commercetools.com/api/projects/cartDiscounts#cartdiscounttarget, cart totalPrice is a supported target. I also tried manually creating this cart discount in the CommerceTools UI then queried for it, and the target is returned as:
"target": { "type": "totalPrice" },
Thanks in advance