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

Example of field description

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 Product Configuration

 

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
  • Only Payment Providers that support recurring payments (subscriptions) are offered at checkout
  • Payment is created with Payment Provider selected at checkout
  • Customer is charged based on checkout amount
  • Subscription record is created
  1. Subscription is processed, and for Evergreens, an Order record is created
  2. Payment record is created with Payment Provider stored on the subscription record
  3. Payment Gateway is called and customer is charged using payment token stored on subscription record
  4. Payment amount set to amount successfully charged
  5. Subscription record is updated
Always Process, Charge if possible
  • All Payment Providers offered at checkout
  • Payment is created with Payment Provider selected at checkout
  • Customer is charged checkout amount unless provider is a Pay Later or Pay on Account type
  • Subscription record is created
  1. Subscription is processed, and for Evergreens, an Order record is created
  2. Payment is created with Payment Provider stored on the subscription record
  3. If Provider supports subscriptions, Payment Gateway is called and customer is charged with payment token stored on subscription record
  4. Payment amount set to amount successfully charged
  5. Subscription record is updated
Always Process, Charge first
  • All providers offered at checkout
  • Payment is created with Payment Provider selected at checkout
  • Customer is charged whole amount unless Provider is PayLater or Pay on Account type
  • Subscription record is created
  1. Subscription is processed, and for Evergreens, an Order record is created
  2. Payment is created with Payment Provider stored on the subscription record
  3. Payment Gateway is not called.
  4. Payment amount set to 0
  5. Subscription record is updated
Always Process, Never Charge
  • All providers offered at checkout
  • Payment is created with Payment Provider selected at checkout
  • Customer is charged non-subscription amount only unless Provider is PayLater or Pay on Account type
  • Subscription record is created
  1. Subscription is processed, and for Evergreens, an Order record is created
  2. Payment is created with Payment Provider stored on the subscription record
  3. Payment Gateway is not called.
  4. Payment amount set to 0
  5. Subscription record is updated
Never Process, Charge if possible
  • All providers offered at checkout
  • Payment is created with Payment Provider selected at checkout
  • Customer is charged whole amount unless Provider is PayLater or Pay on Account type
  • Subscription record is created
  • Nothing happens
  • Subscription record is not updated
Never Process, Never Charge
  • All providers offered at checkout
  • Payment is created with Payment Provider selected at checkout
  • Customer is charged non-subscription amount only unless Provider is PayLater type
  • Subscription record is created
  • Nothing happens
  • Subscription record is not updated

 

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.

Subscription processing job is run daily and subscriptions will be processed when all these conditions are met:

A subscription will not be processed when any of these conditions are met:

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

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

 

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:

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