action.skip

Best Practice: Product Subscriptions

One of the core concepts of JustOn is subscription billing. These billing plans allow you to bill (recurring) items on a regular basis.

Think of the following scenario:

You sell a product subscription in your web shop. Via an API integration, the web shop triggers the creation or update of an account, payment instrument and subscription in Salesforce.

You will then have JustOn produce invoices. Using the saved payment data, you want the corresponding payments to be collected automatically.

Once the payments are confirmed, you want to generate orders to support your fulfillment.

Workflow Outline

In a rough outline, the solution may work as follows:

uc_product_subscr
Invoicing product subscriptions

(1) As part of the checkout process, the web shop sends the payment information to the payment provider. In addition to the amount, this information must include the used payment method (credit card, direct debit).

(2) The payment provider returns relevant data as a payment token to the web shop.

(3) Once the sales transaction is complete, the web shop uses an API integration with JustOn to transfer the user's master data, the relevant product data and the payment token. Based on the received data, JustOn creates or updates an account, a subscription and a payment instrument.

(4) You then have JustOn execute an invoice run. This generates invoices based on the available subscription data.

Upon invoice finalization, JustOn generates PDF copies of the invoices. By default, these files are sent out via email. Depending on your requirements, however, you can use other distribution methods.

(5) Once the invoices are created and set Open, you have JustOn execute a payment run to collect the (pre-authorized) payment. Based on the invoice and using the payment method information from the payment instrument, the payment run produces the corresponding payment request.

(6) In response to the payment request, the payment provider notifies JustOn about the successful payment capture. JustOn, in return, creates a balance record for the captured amount and sets the invoice Paid.

(7) To support your fulfillment processes, JustOn provides a custom process for generating orders.

(8) Depending on your requirements, you can then export these orders to your ERP system or integrate with a fulfillment service provider.

(9) Based on the received order data, the ERP system or fulfillment provider triggers the product shipment to the user.

Setup Overview

Setting up the JustOn-relevant part of the outlined solution (steps 3-7) involves, consequently, at least the following tasks:

  1. Build an API integration, connecting the web shop with JustOn.

    This will transfer the user's master data, the relevant product data and the payment token. JustOn will create or update the corresponding accounts, subscriptions and payment instruments.

    As JustOn operates on Salesforce Platform, you can use any of Salesforce Platform APIs to insert and update records, for example the REST API or the Bulk API.

  2. Set up the invoice run to generate invoices from the subscriptions.

    This may involve

  3. Set up the payment run.

    This will automatically collect the payments using the stored payment instruments, create corresponding balances and set the invoices Paid.

    For details, see Scheduling Payment Collection.

  4. Create a custom process for generating orders.

    You can, for example, have JustOn trigger the process to create an order when the invoice status changes to Paid.

    For help about creating processes, see Lightning Process Builder in the Salesforce Help.

Additional Features

Depending on your specific use case, the additional configuration may include