Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 3.3 KB

NewCampaign.md

File metadata and controls

47 lines (40 loc) · 3.3 KB

TalonOne::NewCampaign

Properties

Name Type Description Notes
name String A user-facing name for this campaign.
description String A detailed description of the campaign. [optional]
start_time DateTime Timestamp when the campaign will become active. [optional]
end_time DateTime Timestamp when the campaign will become inactive. [optional]
attributes Object Arbitrary properties associated with this campaign. [optional]
state String A disabled or archived campaign is not evaluated for rules or coupons. [default to 'enabled']
active_ruleset_id Integer ID of Ruleset this campaign applies on customer session evaluation. [optional]
tags Array<String> A list of tags for the campaign.
features Array<String> The features enabled in this campaign.
coupon_settings CodeGeneratorSettings [optional]
referral_settings CodeGeneratorSettings [optional]
limits Array<LimitConfig> The set of budget limits for this campaign.
campaign_groups Array<Integer> The IDs of the campaign groups this campaign belongs to. [optional]
type String The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. [optional] [default to 'advanced']
linked_store_ids Array<Integer> A list of store IDs that you want to link to the campaign. Note: Campaigns with linked store IDs will only be evaluated when there is a customer session update that references a linked store. [optional]
evaluation_group_id Integer The ID of the campaign evaluation group the campaign belongs to. [optional]

Code Sample

require 'TalonOne'

instance = TalonOne::NewCampaign.new(name: Summer promotions,
                                 description: Campaign for all summer 2021 promotions,
                                 start_time: 2021-07-20T22:00Z,
                                 end_time: 2021-09-22T22:00Z,
                                 attributes: null,
                                 state: enabled,
                                 active_ruleset_id: 6,
                                 tags: [summer],
                                 features: [coupons, referrals],
                                 coupon_settings: null,
                                 referral_settings: null,
                                 limits: null,
                                 campaign_groups: [1, 3],
                                 type: advanced,
                                 linked_store_ids: [1, 2, 3],
                                 evaluation_group_id: 2)