When it comes to Salesforce Billing, it is termed as an add-on package that automates invoicing and allows businesses to accept and allocate payments on the salesforce platform simply. In Salesforce CPQ, a sales rep finalizes a quote and creates an order from it.
Salesforce Billing picks up the order for generating an invoice, payment, and revenue recognition records. In this way, it plays a significant role in theQuote-to-Cash process. An organization needs to maintain the correct billing standards. A key to customer satisfaction is invoicing and handling the payment in a way that works best.
This blog will explore more about Salesforce payment processing in Salesforce Billing.
Below is the high-level flow of the Payment Data Model, which involves leading objects like Accounts, Invoice, and Payment.
Invoice:
- Salesforce Billing allows you to create an invoice record manually or automate the invoice creation process with an Invoice scheduler. When it comes to an invoice scheduler, it evaluates order products as per user-defined criteria and creates an invoice with invoice lines.
- Invoices display an inventory of purchased items and services alongside the total amount a customer must pay. The invoice record contains essential details like the balance, due date, and payment status.
- Before going into much detail to understand how the invoices are processed for payment, Let's explore the critical fields and functioning of objects like Salesforce Payment Gateway, Payment Method, Payment Scheduler, Payment Run and Payment.
Payment Gateway
Payment Gateways are external service providers that process payments. It contains the information for building the connection between salesforce billing and the external gateway.
Salesforce Billing offers Salesforce payment processing integration with many payment gateways like CyberSource, AuthorizeDotNet, Payeezy, etc. To configure the payment gateway, we need to install the AppExchange package and follow the steps mentioned in its documentation.
Here we are using CyberSource as a Payment Gateway, as shown below:
Important Fields
Field | Description |
---|---|
Active | It must be Active. |
Default | If it is checked, then all transactions in Salesforce Billing use this payment gateway. |
Gateway Type | It is a picklist having values for CyberSource, AuthorizeDotNet, and Payeezy. |
Now that the Salesforce payment gateway record has been created, Let's create a payment method:
Payment Method
The Payment Method stores a customer’s ACH or credit card details and information about the payment gateway. The most efficient payment methods are to quickly submit payments rather than manually entering the payment information each time payment occurs.
In Salesforce, we can create payment method records from the related list on Account. It is shown below:
Note: There can be only one Payment Method on an Account that must be selected as AutoPay.
While creating a payment method, the user needs to enter credit card details. The sample test data is shown below:
Important Fields
Field | Description |
---|---|
Payment Gateway | It is a lookup of the payment gateway record used for creating the payment. |
Payment Type | It is a picklist having values for Credit Card and ACH. |
AutoPay | It is a checkbox field. If checked, this payment method is automatically considered for creating payments on this Account. |
Payment Gateway Token | It is a unique value representing the payment method with the payment gateway. Salesforce does not expose sensitive customer information during the payment process, such as credit card numbers; instead, it uses this token value against the payment. |
After creating a record for the Salesforce payment gateway and the payment method, you must create a payment scheduler to process payments for posted invoices with unpaid payment status.
Payment Scheduler
Payment Scheduler is an object used to schedule the payment run process, as the name suggests. It has information for start date & time, target date, payment type, and schedule type. The scheduled frequency can be once, daily, weekly, or monthly.
Important Fields
Field | Description |
---|---|
Payment Batch | It is an optional field, but it has value. It evaluates the invoices with a matching value. |
Payment Type | It is a multi-select picklist with values such as ACH and Credit Card |
Start Date and Time | It is needed to start the first payment run, regardless of type. |
Target Date | It is used to evaluate the invoices for processing payment based on date value. |
Based on the Salesforce billing package level settings shown below, we can choose whether the scheduler picks up the invoices based on invoice date or invoice due date.
Payment Run
Payment Run is used to automate the collection of payments against recurring charges. A payment run evaluates an account's payment method or the payment method overridden on the Invoice and uses that method to collect payments for posted invoices.
Once the Payment schedular picks the invoices for processing, the corresponding payment run record gets created. It is available as a related list on the payment Schedular as shown below:
The Payment run contains information about the number of Invoices processed, successful transactions, failed transactions, total transactions generated, and total payment processed.
It also has details for start time & completed time for payment run.
Important Fields
Field | Description |
---|---|
Payment Scheduler | It is a lookup to the payment scheduler record from which this payment run is created. |
Status | It is a picklist with values like Started, Processing, Completed, Failed. |
Target Date | It stores the value from the payment scheduler Target Date to process the invoices. |
Start Time | It stores the start date and time for the payment run. |
Completed Time | It stores the completed date and time for the payment run. |
Once the payment run completes processing, it generates Payment Transaction records for the invoices. It has details like Gateway Status, Response Code, Response Status, Response Gateway ID, etc., as shown below:
If the transaction is Approved, the "Payment Created" checkbox is checked on the payment transaction record, and the corresponding payment record is generated in Salesforce.
Payment
It is used in Salesforce to capture payment details. A paymentrecord stores information about the payment amount and the payment type and looks up to the Account where the payment can be applied.
It also stores information about Payment Allocations, Unallocations, and Refunds.
Important Fields
Field | Description |
---|---|
Payment Number | It is an autogenerated unique ID for this payment record. |
Payment Type | It stores the value for the type of payment used. It has ACH, Bank Transfer, Cash, Check, and Credit Card Values. |
Amount | It is a currency field that stores the amount for processed payment. |
Status | It is a picklist field that defines the state of the payment. It has values like Draft, Cancelled, and Posted. |
When a payment run creates a payment for an invoice, it automatically creates Payment Allocations against the full balance of each invoice line. It is available as a related list on the payment record.
Salesforce Billing provides one more important feature: to apply for Refunds. It can be provided when customers want to cancel or change their invoiced order products by unallocating the payment amount.
Criteria for Invoices to be picked up by Payment Scheduler
For an Invoice to be picked up by the Payment Scheduler, the following are essential criteria that must be satisfied.
- Invoice Status should be posted.
-
The balance on the Invoice should be greater than 0.
- The Payment Batch field on the Invoice must be contained in the multi-select picklist Payment Batch on the Payment Scheduler, or they must both be null.
- The Default Payment type, i.e. (Credit Card, ACH), must be contained in the Payment Type on the Payment Scheduler.
- The Target Date on the Payment Run must be greater than or equal to the invoice date or Invoice due date based on the package settings "Payment Scheduler Pickup Date (on or after)."
- An Active, Default Payment Method on the Account must be set to "Auto Pay," or Autopay Payment Method must be overridden on the Invoice
- The Payment Gateway value on the Active Default Payment Method must match the Payment Gateway value on the Payment Scheduler.
- TheCorrective Action (Payment Run) field on the Invoice should be null.
If any of the above criteria still need to be fulfilled, then there might be a chance for invoices not to be picked up by the payment scheduler.