Voucher Object Reference
On this page
Overview
Vouchers can be used at checkout as payment
| Property | Value |
|---|---|
| API Name | s_c__Voucher__c |
| Label | Voucher |
| Plural Label | Vouchers |
| Type | Custom Object |
Fields
| Field Label | API Name | Type | Required | Description |
|---|---|---|---|---|
| Activate Before Datetime | s_c__Activate_Before_Datetime__c |
DateTime | No | The date and time by which this Voucher must be activated. If not activated before this date, the Voucher can no longer be activated. |
| Activated At | s_c__Activated_At__c |
DateTime | No | Date and Time when the voucher is activated. |
| Activation Code | s_c__Activation_Code__c |
Text(80) | No | A unique code required to activate a voucher. |
| Asset | s_c__Asset_Id__c |
Lookup (Asset) | No | The asset linked to the Voucher, usually applicable for physical vouchers. |
| Code | s_c__Code__c |
Text(80) | No | The unique code for this Voucher that can be entered during checkout. |
| Email Fields | s_c__Email_Fields__c |
MultiselectPicklist | No | Auto generated value fields that will be included on the email |
| Expires At | s_c__Expires_At__c |
DateTime | No | The exact time at which this Voucher expires. The time zone used is per the users time zone setting in Salesforce and the time is then converted and saved as the equivalent time in UTC. If setting a future date, be sure to take any time zone changes into account. |
| Opening Balance | s_c__Opening_Balance__c |
Currency(18,2) | Yes | The initial value of this Voucher. |
| Order Item | s_c__Order_Item_Id__c |
Lookup (OrderItem) | No | The Order Item that this Voucher was purchased with. |
| PIN | s_c__Pin__c |
Text(80) | No | A PIN code used to activate or utilize the voucher. |
| Product | s_c__Product_Id__c |
Lookup (Product2) | No | The Product that defines what type of Voucher this is. |
| Recipient | s_c__Recipient_Id__c |
Lookup (Contact) | No | The Contact to send this Voucher to. |
| Resend Email | s_c__Resend_Email__c |
Checkbox | No | When checked, this will send the Voucher email to the Recipient_Id__c. |
| Status | s_c__Status__c |
Picklist | No | Shows the current state of the voucher, such as whether it is waiting to be activated, available for use, cancelled, or temporarily locked. |
| Store | s_c__Store_Id__c |
Lookup (s_c__Store__c) | Yes | The Store that this Voucher belongs to. |
| Usage | s_c__Usage__c |
Picklist | Yes | Indicates whether the Voucher can be used on other Stores. |
Relationships
| Field | Type | Related Object | Relationship Name |
|---|---|---|---|
s_c__Asset_Id__c |
Lookup | Asset | Vouchers |
s_c__Order_Item_Id__c |
Lookup | OrderItem | Voucher_OrderItem |
s_c__Product_Id__c |
Lookup | Product2 | Voucher_Product |
s_c__Recipient_Id__c |
Lookup | Contact | Voucher_Contact |
s_c__Store_Id__c |
Lookup | s_c__Store__c | Voucher_Stores |
Referenced by
These objects hold a lookup or master-detail relationship to Voucher (s_c__Voucher__c). Where the referring record exists to join things together, Also links to shows what it connects this object to.
| Object | Field | Type | Relationship Name | Also links to |
|---|---|---|---|---|
| s_c__Voucher_Log__c | s_c__Voucher_Id__c |
Lookup | Voucher_Logs | — |
| s_c__Voucher_Payment__c | s_c__Voucher_Id__c |
MasterDetail | Voucher_Payment_Vouchers | s_c__Payment__c |
On the storefront
Storefront templates read this object through the Voucher Liquid object, written as voucher in a theme.
| Salesforce field | Liquid attribute |
|---|---|
s_c__Code__c |
voucher.code |
Fields you add yourself are not listed above. Expose one with a Custom Data Mapping record, then read it from voucher.data. See custom data fields in Liquid.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.