Newer Version Available

This content describes an older version of this product. View Latest

VoucherDefinition

Represents details about a voucher definition that’s associated with a loyalty program. This object is available in API version 51.0 and later.

Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

Fields

Field Details
AutogeneratedCodeLength
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The length of the auto-generated voucher code. If no value is specified, the default is eight digits. This field is available in API version 57.0 and later.
CodePrefix
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The prefix of the auto-generated voucher code. This field is available in API version 57.0 and later.
CodeSuffix
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The suffix of the auto-generated voucher code. This field is available in API version 57.0 and later.
CostPerVoucher
Type
currency
Properties
Create, Filter, Nillable, Sort, Update
Description
The liability incurred for each voucher that's issued. This field is available in API version 52.0 and later.
Description
Type
textarea
Properties
Create, Filter, Nillable, Sort, Update
Description
The description of the voucher.
DiscountPercent
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The discount percentage associated with the voucher.
EffectiveDate
Type
date
Properties
Create, Filter, Group, Sort, Update
Description
Required. The date on which the voucher becomes valid.
EffectiveDateTime
Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
The date and time from when the vouchers issued by the voucher definition can be redeemed by customers. This field is available in API version 62.0 and later.
ExpirationDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The date the voucher expires. The expiration date is only valid for the fixed date model.
ExpirationDateTime
Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
The date and time on which the vouchers issued by the voucher definition are no longer available for customers to redeem. This field is available in API version 62.0 and later.
ExpirationPeriod
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The number of days or months in the expiration period.
ExpirationPeriodUnit
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
The unit for the expiration period.
Possible values are:
  • Days
  • Months
ExpirationType
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Required. The type of expiration for the voucher.
Possible values are:
  • FixedDate
  • Period
FaceValue
Type
currency
Properties
Create, Filter, Nillable, Sort, Update
Description
The value of the voucher.
HasTimeBasedVoucherPeriod
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort
Description
Indicates whether vouchers issued using the definition are effective and expire at a specific date and time. This field is available in API version 62.0 and later.
The default value is false.
ImageUrl
Type
url
Properties
Create, Filter, Nillable, Sort, Update
Description
The URL for the voucher definition image. This field is available in API version 57.0 and later.
IsActive
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Required. Indicates whether the voucher is active (true) or not (false).
The default value is false.
IsPartialRedeemable
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the voucher can be partially redeemed (true) or not (false). This field is available in API version 53.0 and later.
The default value is false.
LastReferencedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The most recent date on which a user referenced this record.
LastViewedDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The most recent date on which a user viewed this record.
LoyaltyProgramId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the loyalty program.
This is a relationship field.
Relationship Name
LoyaltyProgram
Relationship Type
Lookup
Refers To
LoyaltyProgram
Name
Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The name of the voucher.
OwnerId
Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The ID of the user who owns this record.
This is a polymorphic relationship field.
Relationship Name
Owner
Relationship Type
Lookup
Refers To
Group, User
PartnerAccountId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The partner associated with the voucher.
This is a relationship field.
Relationship Name
PartnerAccount
Relationship Type
Lookup
Refers To
Account
ProductCategoryDerivedFieldId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
A look up to show product category in voucher definition.
This is a relationship field.
Relationship Name
ProductCategoryDerivedField
Relationship Type
Lookup
Refers To
ProductCategory
ProductDerivedFieldId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
A look up to show product in voucher definition.
This is a relationship field.
Relationship Name
ProductDerivedField
Relationship Type
Lookup
Refers To
Product2
ProductId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The product associated with the voucher.
This is a polymorphic relationship field.
Relationship Name
Product
Relationship Type
Lookup
Refers To
Product2, ProductCategory
Type
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Required. The type of voucher.
Possible values are:
  • DiscountPercentage—Discount Percentage
  • FixedValue—Fixed Value
  • ProductOrService—Product or Service

Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

VoucherDefinitionChangeEvent (API Version 62.0)
Change events are available for the object.
VoucherDefinitionHistory
History is available for tracked fields of the object.
VoucherDefinitionShare
Sharing is available for the object.