This article outlines an example integration that can be built between Salesforce Revenue Cloud and Asperato to generate Asperato Payments from Salesforce Invoices. 

All configuration mentioned below would need to be built by a customer or their SI partner, and is not part of the standard Asperato package.


This method does not have to be used if customers would prefer different objects to be linked, but it gives a good starting point for creating the integration.


Salesforce Billing Invoices to Asperato Payments



The process flow above shows that the Salesforce Invoice will be the source record from which an Asperato Payment record will be created.


The Payment record should be created when the Invoice goes to the “Posted” Status.


A formula field can be created on the Invoice to display the Asperato Payment Pay Link/ Pay Button on the Invoice via an Asperato Payment lookup field.


Once the payment has been collected, a second process will run to create a Salesforce Payment record from an Asperato Payment record and set the Invoice Reconciliation. This will enable the Payment Status on the Invoice to be correctly reflected.


To complete the process outlined above, the following configuration would be required:


Task

Name

Object

Details

Install Asperato package

Asperato ONE



Assign Permission Set

Asperato Full Admin


Assign to users as required

Asperato Connection

Asperato Setup Tab


Connect Salesforce Org to Asperato and create PSP creations required.

Enable Paths



Setup Task to enable Paths in the Org

Payment Lookup field

Asperato_Payment__c

Invoice

Lookup to Asperato Payment

Payment Status field

Payment_Status__c

Invoice

Formula to show Stage field from Asperato Payment

Payment Link field

Payment_Link__c

Invoice

Formula to show Payment Image field from Asperato Payment

Invoice Page Layout

Invoice Layout

Invoice

Added section for Payment Information to Invoice Page Layout

Asperato Payment creation Flow

Create Asperato Payment from Posted Invoice 

Invoice

Flow - record triggered when Invoice posted.

Creates Asperato Payment record & populates lookup back on Invoice

SF Payment creation Flow

Create_SF_Payment_from_Asperato_Payment

asp04__Payment__c

Record triggered flow when Asperato Payment Stage = Collected from Customer.

Creates Salesforce Payment record & allocates to Invoice

SF Payment Lookup field

Salesforce_Payment__c

asp04__Payment__c

Lookup to Payment

Invoice Line Lookup field

First_Invoice_Line__c

asp04__Payment__c

Lookup to Invoice Line Item



Salesforce Revenue Cloud to Asperato Authorisations


For recurring Billing, an Asperato Authorisation record will need to be created to capture the customer’s saved payment method.


This record can either be created at a stage prior to billing as shown in the example above, or at the same time as the first invoice is generated.


In the example above, a flow is required to create an Asperato Authorisation record when an Opportunity is set to the Stage “Closed Won”. 


The source object does not necessarily have to be the Opportunity, the Authorisation can be created at any point in the process that most suits the business, for example, it could be from the Quote, Opportunity, Order, Contract or Invoice stage.


Configuration required in addition to that outlined in the invoice process above will be:

  • Flow - to create Authorisation record from source object

  • Lookup field on Authorisation to source object or Account 

  • Amendment to flow which creates Asperato Payment from the Invoice to find the association Authorisation record (via the lookup to Account or source object) and populate the mapping to Authorisation lookup field on Asperato Payment record

  • Schedule the Apex Job for the Asperato Repeat Payment