Payments2Us ManualsPayments2Us User Manual BPAYHow to Setup BPAY Customer Reference Numbers

How to Setup BPAY Customer Reference Numbers

1. Customer Reference Number overview

A BPAY Customer Reference Number (CRN) is a number assigned by your organisation to identify your customer or service.

A Customer Reference Number can be setup the following areas:

  • Contact record.  Used by that individual payer to make payments.
  • Payment Txn record.  Assigned on checkout when a payer nominates to pay via BPAY.  Or, this can be used when invoicing/charging for a service that can vary for each Contact.
  • On any custom object.  The CRN number can be assigned here and later placed onto the Payment Txn record by using workflow or process builder.  

A CRN can be generated in Salesforce when a record is saved, by using Process Builder to generate and assign or by using an external tool to generate an load.

2. Generating CRNs Options

2.1. Externally generate CRNs

Biller Codes or Customer Reference Numbers (CRN) can be generated by programs downloaded from your bank. For more information go to the BPAY help page.

After generating, use data loader or similar to update the Customer Reference Number field on the Contact or Payment Txn record.

2.2. Generating a CRN when saving a record

For this option, you will need a License key to enter against the merchant facility.  Contact support @ payments2us.com for a BPAY CRN license key.

On the Contact or Payment Txn record enter or use Workflow fieldupdates/Process Builder to assign:

  1. A membership number.  This is a number that does not have the CRN check digit on it.
  2. Select "Generate MOD10V01".  This will be updated to "MOD10V01" on save.  It is the algorithm used to generate the CRN from the membership no.

On Save, the Customer Reference Number (3) is generated and assigned to the record.

Note: this might take a second or so to assign and a refresh of your page layout may be required to see the generated CRN.

2.3. Using Process Builder to Generate and Assign CRNs

For this option, you will need a License key to enter against the merchant facility.  Contact support @ payments2us.com for a BPAY CRN license key.

For assistance on this option over and above what is shown in this user guide will require Payments2Us Premium Support.

The Process Builder option provides the most flexibility for generating a CRN from any field and assigning the generated CRN number to any field on any object.

The example below generates and assigns a CRN to a Payment Txn record if it is missing a Customer Reference Number.

Create a New Process Builder (setup - Search "Process Builder", Click "New" button"

  • Enter Name, for example "BPAY CRN Generation"
  • Process Starts When "A record changes".
  • Press "SAVE"

Add Object

  • Select Object "Payment Txn"
  • Select "when a record is created or edited"
  • Press "SAVE"

Add Criteria

  • Name "When missing CRN"
  • Criteria "Customer Reference No."  IsNot Equals True

2.3.1. Select Action Apex Class

Select Action Apex Class.

  • Enter in a name.  For example "Generate BPAY CRN".
  • For the Apex Class name, start typing "Payments2Us" and then select "Payments2Us Generate BPay CRNs" (1).
  • For the next step of assigning Apex Variables, click the "+ Add Row" (2).  (see more instructions following the screenshot)

2.3.2. Assign Apex Variables

Click the "+ Add Row"  to enter apex variables.

  1. SObject API Name - the Object's API name, e.g. "AAkPay__Payment_Txn__c"
  2. SObject Record Id - the value (field reference) to the record id of the Object being updated, e.g. [AAkPay__Payment_Txn__c.id]
  3. BPAY CRN Rule Field API Name - the field's API Name on the SObject that contains the check digit rule value.  Values currently are "MOD10V01Generate" or "MOD10V01".  An example field name is "AAkPay__BPAY_CRN_Rule__c"
  4. Customer No Field API Name - the field's API Name on the SObject that contains the customer number without the BPAY CRN check digit, e.g. AAkPay__Membership_Id__c
  5. Customer Reference Field API Name - the field's API Name on the SObject that will be assigned the newly generated CRN No. E.g.  AAKPay__Biller_Code__c.