Subscription Products
Products can be configured so payments will be charged on a recurring basis. When a subscription product is purchased at checkout, a Subscription record is created for it which is where any recurring payments are managed from.
Some examples where you may use this type of product are for memberships, donations, replenishment of consumables, etc.
Configuring Subscription Products
Prerequisites
If Salesforce CPQ is installed, it is necessary to adjust your configuration by using only CPQ fields for subscriptions and removing any overlapping StoreConnect fields from your page layout. Subscription Term and Subscription Pricing and Subscription Type may appear twice. It is important to use the CPQ field and remove the StoreConnect fields from your page layout.
To know which one is the StoreConnect field, move your mouse over the field item, it will start with s_c.
.
Product Fields
Products have several fields that are used to configure the product to work as a subscription. Each field is listed below with its configuration options.
For a product to be classified as a Subscription Product, these fields must be set on the product record:
- Subscription Pricing
- Subscription Type
Subscription Pricing
This is the pricing mode used, currently only Fixed Price
is supported by StoreConnect.
Subscription Type
This is the type of subscription term being used, currently Evergreen
and One-time
are supported.
Evergreen subscriptions will run endlessly until the subscription is cancelled by the customer from their order history page in your store or if the payment fails too many times (see Delinquent Payments below), or is manually cancelled on the Subscription record. Each time the subscription is processed, a new order is created in Salesforce with an Order Product that matches the one on the original order that created the subscription. The Subscriptions related list will show you all the occurrences where the subscription has been processed.
One-time subscriptions have a fixed number of payments to be paid, which once paid, the subscription ends. This subscription can also end if cancelled due to too many failed attempts (see Delinquent Payments below), or is manually cancelled on the subscription record. The customer doesn’t have the option to log into the store to cancel this type of subscription. Each payment taken is added to the original order as a Payment record in Salesforce.
Subscription Term and Subscription Term Unit
These determine how often payment is taken for the Subscription.
For example, a monthly subscription would be:
Subscription Term: 1
Subscription Term Unit: Month
An annual subscription would be:
Subscription Term: 12
Subscription Term Unit: Month
Default Values
The default Subscription Term is 12
.
There is a Default Subscription Term Unit set in the StoreConnect custom metadata. If a Product’s Subscription Term Unit
is empty, it will automatically be set to that value. You can update the default by going to Custom Metadata Types in Salesforce Setup.
Note: if using CPQ, this metadata setting must match the CPQ Subscription Term setting
Subscription Term Count
When configuring a product with a Subscription Type of One-time, you need to set how many times the customer is to be charged until the subscription is considered “fully paid” and therefore ended. This would include the first payment made when completing checkout.
For example, if a product was $1000 and was to be paid $100 per month, you would set the Price Book Entry List Price to $100 and the Term Count to 10
so the customer would be charged $100 a total of 10
times adding up to $1000.
Subscription Billing Delay and Subscription Billing Delay Unit
These determine the delay before the next subscription is charged. You would use this feature to give you time to adjust the price of the next subscription payment before it gets charged. This is handy when your subscription product pre-pays for a service where you credit unused service to the following term or the customer used above what the subscription covers so you add the difference on for this next payment.
For example, a 3-day delay would be:
Subscription Billing Delay: 3
Subscription Billing Delay Unit: Day
Where Next Renewal Date is the 1st of the month, Next Billing Date would be the 4th of the month.
A delay of a month would be:
Subscription Billing Delay: 1
Subscription Billing Delay Unit: Month
This could be used on an annual subscription where the payment for the next year is charged a month into the year.
Subscription Behaviour Picklist
How the subscription is to behave at checkout and in the future. Do you want to process the subscription and take credit card payments automatically or do you wish to manage part or all of the subscription manually?
Behaviours Explained
Behaviour | At Checkout | At Subscription Next Billing Date |
Always Process, Always Charge |
|
|
Always Process, Charge if possible |
|
|
Always Process, Charge first |
|
|
Always Process, Never Charge |
|
|
Never Process, Charge if possible |
|
|
Never Process, Never Charge |
|
|
Subscription Management
There may be times where you are required to update a subscription or intervene in some way. Each subscription can be managed from its Subscription record which is directly related to the original order it was created from as well as the Contact it belongs to so can be found via the related list of either. You can also access Subscriptions from the Subscriptions tab in the StoreConnect Stock app.
Consider adding Feed Tracking to the Subscription object to keep a history of what changes are made, when and by who for better visibility of a subscription’s history.
When are Subscriptions Processed?
There are several fields related to the subscription term which are taken from the Product by the system when the user purchased the subscription.
- Term Length - The number portion of the term (e.g. for quarterly payments this would be 3 with a Term Unit of month)
- Term Unit - The unit of the Term Length (e.g. ‘month’ or ‘day’)
- Next Renewal Date - When the next subscription term begins. On successful payment of the subscription, this date will update to the new Next Renewal Date based on the Term Length and Unit (new Next Renewal Date = Next Renewal Date + Term Length)
- Next Billing Date - On successful payment of the subscription, this date will update to the Next Renewal Date plus any delay that is configured
- Billing Delay Length - Determines the delay between the subscription term renewing and the payment being processed
- Billing Delay Unit - The unit of time for Billing Delay Length
Subscription processing job is run daily and subscriptions will be processed when all these conditions are met:
- Process Subscription is True
- Next Billing Date is today or in the past
- Start Date is today or in the past
- End Date is blank or in the future
- Cancelled Date is blank or in the future
- Suspended Date is blank or in the future
A subscription will not be processed when any of these conditions are met:
- Process Subscription is False
- Next Billing Date is in the future
- Start Date is in the future
- End Date is in the past
- Cancelled Date is in the past
- Suspended Date is in the past
When a subscription is processed, the Next Renewal Date and Next Billing dates are then updated to the next term unless payment fails in which case the subscriptions payment is considered ‘delinquent’.
For monthly payments, if a billing date is 31st and the following month there are only 30 days, the billing date will move to the 30th from that point on. When it gets to February, the billing date will become 28th (29th on a leap year) and will continue as the 28th of the month moving forward.
Warning: If updating the Next Billing Date, make sure you consider updating the Next Renewal Date also. Remember that the Next Billing Date will be updated at next payment to the new Next Renewal Date plus any delay. If the Next Renewal date is in the past, the Next Billing Date may also end up in the past.
To Charge or Not to Charge
- The Process Subscription checkbox is populated based on the product's Subscription Behaviour at the time the Subscription was created. This field determines if the subscription is to be processed on the Next Billing Date or not.
- The Charge Payments checkbox is populated based on the product's Subscription Behaviour at the time the Subscription was created. This field determines if the subscription is to debit funds from the customers credit card on the Next Billing Date or not.
If a fixed end date is needed, the End Date of the subscription can be set manually. Alternatively, the Cancelled Date can be set to prevent any further payments. Subscriptions can also be paused by setting the Suspended Date. Removing the Suspended Date, End Date and Cancelled Date will let the subscription continue.
For One-time subscriptions, the End Date gets set by the system on creation based on the number of terms for the subscription. If you temporarily suspend the subscription and then un-suspend it, consider if you need to extend the End Date.
What to Charge
- Term Price - This is the price for the subscription and is set automatically when a subscription product is purchased at checkout. This is what is charged each time the subscription runs and can be updated if the subscription amount changes period to period. The subscription is always charged in the same currency it was first set up with. Changing the Term Price will change the amount the customer is charged when the subscription is next processed.
Delinquent Payments
If a subscription payment fails the Delinquent Date will be set to the date of the first failure, and the Delinquent Reason will be set with a date and any message returned by the payment provider (e.g. “Card Expired”).
On a successful retry, the subscription is processed as normal and the Delinquent Date and Delinquent Reason fields are cleared.
While the Next Billing Date is in the past and a Delinquent Date is set, StoreConnect will automatically retry the payment 5 times with increasing wait times:
- 1 day after Delinquent Date
- 2 days after Delinquent Date
- 3 days after Delinquent Date
- 5 days after Delinquent Date
- 8 days after Delinquent Date
On each subsequent failed retry, the Delinquent Reason has the date and any message returned by the payment provider appended to the end of the existing field data, creating a log of each failed attempt.
If the final attempt fails, the Suspended Date will be set, and no further payments will be attempted. You should setup a notification in Salesforce so you get alerted when this happens. You can also configure an email to go out from Salesforce to alert the contact each time a payment has failed and when it will be attempted again.
Back to Documentation