Properties
automation_id
automation_id: string
created_at
created_at: string
Optional custom_event
custom_event: { schema_id: string }
Optional event
event: "customer.segment.entered" | "order.paid" | "custom_event" | "customer.loyalty.tier.upgraded" | "customer.loyalty.tier.downgraded" | "customer.loyalty.tier.prolonged" | "customer.loyalty.tier.joined" | "customer.loyalty.tier.left"
Optional expiration_date
expiration_date: string
Optional loyalty_tier
loyalty_tier: { id: string }
metadata
metadata: Record<string, unknown>
object
object: "earning_rule"
Optional segment
segment: { id: string }
source
source: { banner?: string; object_id: string; object_type: "campaign" }
Type declaration
-
Optional banner?: string
-
object_id: string
-
object_type: "campaign"
Optional start_date
start_date: string
Optional validity_day_of_week
validity_day_of_week: number[]
Optional validity_timeframe
validity_timeframe: { duration: string; interval: string }
Type declaration
-
duration: string
-
interval: string