VoucherDefinition

Represents details about a voucher definition that’s used to issue vouchers. 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 

AutogeneratedCodeLength 

Type: int

Properties: Create, Filter, Group, Nillable, Sort, Update

Description: The length of the auto-generated code of vouchers issued by the definition. 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 code of vouchers issued by the definition. 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 code of vouchers issued by the definition. 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 issued by the voucher definition. 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 definition.

DiscountPercent 

Type: int

Properties: Create, Filter, Group, Nillable, Sort, Update

Description: The discount percentage of the voucher definition.

EffectiveDate 

Type: date

Properties: Create, Filter, Group, Sort, Update

Description: Required. The date on which the vouchers issued by the voucher definition become 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. This field is available in API version 62.0 and later.

ExpirationDate 

Type: date

Properties: Create, Filter, Group, Nillable, Sort, Update

Description: The date on which the vouchers issued by the voucher definition are no longer available for customers to redeem. 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: Specifies the unit for the expiration period.

Possible values are:

  • Days
  • Months

ExpirationType 

Type: picklist

Properties: Create, Filter, Group, Restricted picklist, Sort, Update

Description: Required. Specifies the expiration model of the vouchers issued by the definition.

Possible values are:

  • FixedDate
  • Period

FaceValue 

Type: currency

Properties: Create, Filter, Nillable, Sort, Update

Description: The value of the vouchers issued by the voucher definition.

HasTimeBasedVoucherPeriod 

Type: boolean

Properties: Create, Defaulted on create, Filter, Group, Sort

Description: Indicates whether vouchers issued by 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 definition 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 vouchers issued by the definition 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 associated with the voucher definition.

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 definition.

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 definition.

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 definition.

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 definition.

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.