Skip to content

Configuring SEPA Direct Debit Export

Your organization's business may require to export bank transfer orders for invoices. These payment orders can then directly be used by banks for triggering the corresponding payment operations.

JustOn supports two common implementations of (interchangeable) bank transfer orders:

For invoices whose payment method is either Bank Transfer or Direct Debit, you can produce SEPA XML files for debits and credits using the invoice export mechanism.

Configuring the SEPA Direct Debit export comprises the following tasks:

Info

For information about executing payment exports, see Exporting Bank Transfer Orders.

SEPA Direct Debit Concepts

JustOn exports SEPA Direct Debit orders for invoices if

  • the payment method is either Bank Transfer or Direct Debit, and
  • the invoice's open amount is greater than 0.

Before executing the export, JustOn validates the SEPA payment information. The validation succeeds if the following conditions are true:

  • The invoice refers to a tenant.
  • The following fields of the tenant are set:

    SEPA Creditor ID

    IBAN

    Company

  • The following fields of the invoice are set:

    Bank Account

    Bank Account Owner

    Direct Debit Mandate Granted

    Direct Debit Mandate Reference

    Direct Debit Sequence Type

  • When using a CBI export format, the Member ID field of the tenant contains the ABI code of the bank.

Info

JustOn checks the format and structure (length, allowed characters, etc.) of the SEPA Creditor ID, IBAN, BIC and Direct Debit Mandate Reference according to the definitions in the SEPA Direct Debit Core Schemes.

The result of the validation is written to the SEPA Validation Error field. The bank transfer order for an invoice is exported if the SEPA Validation Error field is empty.

Generated Payment Balance

If the user has selected the option Create Payments upon exporting the bank transfer orders, JustOn creates payment balances according to the exported invoice data. The balance field values are set as follows:

Field Value
Account value of Account of the invoice
Amount inverted value of Next Payment Due of the invoice
Date value of Next Payment Due Date of the invoice
Payment Method value of PaymentMethod of the invoice
Reference string as defined in PaymentReference of the invoice template, with the placeholders resolved using invoice data
Type Payment

Defining Export Settings

Depending on your organization's requirements, you must define an export configuration for SEPA Direct Debit exports.

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Export Settings.

  3. Click New.
  4. Specify the details as necessary.

    Field Possible Values Description
    Name SEPA Direct Debit A unique name for the custom setting record, will be selectable when exporting invoice data.
    Active true | false Determines whether the configuration is available in the UI.
    SEPA: Booking per Transaction true | false Determines whether to override SEPA batch booking (consolidated payment, default). If true, forces an individual SEPA transaction per payment. Produces a corresponding <BtchBookg> element in the SEPA XML.
    CUC 3121975D The unique CBI code that identifies all parties in the CBI community (clients, banks and network access points). Required when using a CBI format string, is applied for and registered by the access bank.
    Create Payments true | false Determines whether to create payment balances on the invoices upon exporting, which sets the invoices Paid.
    Users can overwrite this option manually when starting the export.
    Format XML CDD pain.008.003.02 Creates an XML file in the format CDD (Core Direct Debit, pain.008.003.02).
    XML CDD pain.008.001.02 Creates an XML file in the format pain.008.001.02 (valid for Austria and Netherlands)
    XML CDD CBISDDReqLogMsg.00.01.00 Creates an XML file in the format CBISDDReqLogMsg.00.01.00 (CBI format for Italy)
    Select Condition Date__c = THIS_YEAR Specifies a condition (SOQL WHERE clause) to restrict the set of included records. If empty, matches all invoices in the list.
    For details, see SOQL SELECT Syntax in the Salesforce Help.
    Use ASCII Encoding Scheme true | false Determines whether to perform a phonetic replacement of the contents of the resulting CSV or XML file.
    For XML exports, all required replacements for the SEPA format are performed. For details, see SEPA Requirements for an Extended Character Set (UNICODE Subset) - Best Practices.
    Target Export Specifies the name of a file distribution target for the exported files.
    For exports to cloud storage services, the file distribution target must be the one set up as the storage location with the use case Export and the backend AmazonS3 or GoogleDrive.
    If left empty, the file will only be available on Salesforce's Files tab as of JustOn 2.49.
    Allowed Currencies EUR,SEK Specifies a comma-separated list of currencies that are allowed for ISO 20022 XML formats. Defaults to EUR, which is the only allowed currency for SEPA.
    ISO20022: Service Level Code SEPA Specifies the pre-agreed level of service between the parties. For SEPA, defaults to SEPA. For non-SEPA payments, contact your bank.
  5. Click Save.

Configuring SEPA Payment Fields

Exporting payment orders for SEPA Direct Debit requires a number of fields to be set on the invoice. The required data is taken from the tenant and, usually, from the account. Your business may, however, require to allow for exceptions: You may need to generate an invoice, and consequently, a payment order, with banking data that differs from that on the account. In this case, you need the corresponding data on the source object from which you create the invoice - either the subscription, the opportunity or the source object for arbitrary object billing.

Tenant Fields

The following fields of the tenant must be set:

Field Description
Company The name of the tenant's company.
IBAN The IBAN (International Bank Account Number) of the tenant.
SEPA Creditor ID Each biller in SEPA will be identified with a creditor identifier. This identifier, in connection with the mandate reference, allows the payer and the payer's bank to verify each SEPA direct debit and to process or reject the direct debit according to the payer's instructions. Billers will have to request this identifier according to local practice.

Account Fields

The following fields of the account must be configured:

Field Data Type Description
ON_BankAccount String (34) The International Bank Account Number.
ON_BankAccountOwner String (255) The name of the owner of this bank account. Defaults to Account Name if empty.
ON_BankCode String (11) The bank identifier code.
With an IBAN as bank account number, the bank code (BIC) is not required.
ON_PaymentMethod
or
ON_InvoicePaymentMethod
Picklist The payment method that is preferred for paying invoices of this account.
Use ON_PaymentMethod to fill the corresponding invoice field when creating invoices. Use ON_InvoicePaymentMethod to fill the corresponding subscription field when building subscriptions, out of which you then create invoices.
ON_DirectDebitMandateGranted Date The date on which the direct debit mandate has been granted.
ON_DirectDebitMandateReference String (35) The unique reference key for the direct debit mandate as assigned by the creditor. The maximum length is 35 characters, and the allowed characters include A-Z a-z 0-9 / - ? : ( ) . , ‘ +
You can fill this field automatically using the SEPA mandate reference counter.
ON_DirectDebitSequenceType Picklist First - First direct debit transaction in a series
Recurrent - Recurrent direct debit transaction in a series
JustOn changes the sequence type on the source record from First to Recurrent when finalizing the first generated invoice.
According to recent SDD rule modifications, the use of the sequence type First in a first of a recurrent series of transactions is no longer mandatory. A transaction with the optional sequence type First is processed as a recurrent transaction.
For details, see SEPA Direct Debit Core rulebook.

Source Object Fields

You may need to generate an invoice, and consequently, a payment order, with banking data that differs from that on the account. In this case, you need the corresponding data on the source object from which you create the invoice - either the subscription, the opportunity or the source object for arbitrary object billing.

Note that the subscription fields are available by default. When using opportunities or other source objects, you must create these fields as ON fields. For help about creating fields, see Managing Object Fields.

Info

The fields on the source object overwrite the values set on the account.

Note

Be aware that all bank data fields on the account are ignored if there is a corresponding subscription field set.

Field Data Type Description
BankAccount
ON_BankAccount
String (34) The International Bank Account Number.
BankAccountOwner
ON_BankAccountOwner
String (255) The name of the owner of this bank account. If empty, defaults to Legal Account Name if available, otherwise defaults to Account Name.
BankCode
ON_BankCode
String (11) The bank identifier code.
With an IBAN as bank account number, the bank code (BIC) is not required.
InvoicePaymentMethod
ON_InvoicePaymentMethod
Picklist The payment method that is preferred for paying invoices of this account.
DirectDebitMandateGranted
ON_DirectDebitMandateGranted
Date The date on which the direct debit mandate has been granted.
DirectDebitMandateReference
ON_DirectDebitMandateReference
String (35) The unique reference key for the direct debit mandate as assigned by the creditor. The maximum length is 35 characters, and the allowed characters include A-Z a-z 0-9 / - ? : ( ) . , ‘ +
You can fill this field automatically using the SEPA mandate reference counter.
DirectDebitSequenceType
ON_DirectDebitSequenceType
Picklist First - First direct debit transaction in a series
Recurrent - Recurrent direct debit transaction in a series
JustOn changes the sequence type on the source record from First to Recurrent when finalizing the first generated invoice.
According to recent SDD rule modifications, the use of the sequence type First in a first of a recurrent series of transactions is no longer mandatory. A transaction with the optional sequence type First is processed as a recurrent transaction.
For details, see SEPA Direct Debit Core rulebook.

Invoice Fields

The invoice fields are copied from the account or, if set, from the source object.

Field Data Type Description
BankAccount String (34) The International Bank Account Number.
BankAccountOwner String (255) The name of the owner of this bank account. If empty, defaults to ON_BankAccountOwner if available, otherwise defaults to Account Name.
BankCode String (11) The bank identifier code.
With an IBAN as bank account number, the bank code (BIC) is not required.
PaymentMethod Picklist The payment method that is preferred for paying invoices of this account.
DirectDebitMandateGranted Date The date on which the direct debit mandate has been granted.
DirectDebitMandateReference String (35) The unique reference key for the direct debit mandate as assigned by the creditor. The maximum length is 35 characters, and the allowed characters include A-Z a-z 0-9 / - ? : ( ) . , ‘ +
You can fill this field automatically using the SEPA mandate reference counter.
DirectDebitSequenceType Picklist First - First direct debit transaction in a series
Recurrent - Recurrent direct debit transaction in a series
JustOn changes the sequence type on the source record from First to Recurrent when finalizing the first generated invoice.
According to recent SDD rule modifications, the use of the sequence type First in a first of a recurrent series of transactions is no longer mandatory. A transaction with the optional sequence type First is processed as a recurrent transaction.
For details, see SEPA Direct Debit Core rulebook.

Configuring SEPA Mandate Reference Counters

JustOn can fill the Direct Debit Mandate Reference field on the Account and Subscription objects with an auto-incrementing counter. This is useful if you do not wish to retrieve a direct debit mandate reference from an external system. Once set up, this feature ensures that existing direct debit mandate references are not overwritten. It allows you to set a value manually even if it already exists, and it still sets a counter automatically if it is missing.

For general information about counters, see Counters and Number Ranges.

Account Mandate Reference Counter

For the SEPA mandate reference counter for the Account object to work, JustOn requires the following fields on the Account object (see SEPA Payment Fields):

  • ON_InvoicePaymentMethod
  • ON_DirectDebitMandateReference
  • ON_DirectDebitSequenceType

In addition, JustOn requires the specific invoice counter MandateReferenceAccount to act as the SEPA mandate reference counter. For the counter pattern, you can use all custom placeholders that use the Account object as source, like [AccountNo].

Once set up, you can generate a SEPA mandate reference counter for an account using the button Set Mandate Reference.

Creating Account Counter

Create a specific invoice counter to act as the SEPA mandate reference counter.

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Counters.

  3. Click New.
  4. Specify the details as necessary.

    • Name: MandateReferenceAccount
    • Template: Specify the pattern as necessary. You can use all custom placeholders that use the Account object as source, like [AccountNo]
  5. Click Save.

Adding Counter Generation Button

To enable the manual counter generation for an account using a button:

  1. Navigate to the object management settings of the Account object.
  2. Click Page Layouts.
  3. In the Account Layout row, click Edit.
  4. Add the Set Mandate Reference button to the page layout.

    In Salesforce Lightning, drag the button from the Mobile & Lightning Actions palette to the Salesforce Mobile and Lightning Experience Actions section.

    In Salesforce Classic, drag the button from the Buttons palette to the Custom Buttons area.

  5. Click Save.

    For help about modifying page layouts, see Managing Pages.

Subscription Mandate Reference Counter

For the SEPA mandate reference counter for the Subscription object to work, JustOn requires the following fields on the Subscription object (see SEPA Payment Fields):

  • InvoicePaymentMethod
  • DirectDebitMandateReference

In addition, JustOn requires the specific invoice counter MandateReferenceSubscription to act as the SEPA mandate reference counter. For the counter pattern, you can use all custom placeholders that use the Account object as source, like [AccountNo].

Once set up, the SEPA mandate reference for the subscription is set automatically on subscription creation and modification if the following conditions are met:

  • The field DirectDebitMandateReference of the subscription is empty.
  • The field InvoicePaymentMethod of the subscription equals Direct Debit.

Creating Subscription Counter

Create a specific invoice counter to act as the SEPA mandate reference counter.

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Counters.

  3. Click New.
  4. Specify the details as necessary.

    • Name: MandateReferenceSubscription
    • Template: Specify the pattern as necessary. You can use all custom placeholders that use the Account object as source, like [AccountNo]
  5. Click Save.

Configuring Payment Reference Text

Depending on your organization's requirements, you specify a string that is to be written as the payment reference for SEPA payments. To do so, you configure the template field Payment Reference.

  1. Open the template to be edited.
  2. In the Payment Information section, double-click the Payment Reference field and modify the information as required.

    Modify the default value [InvoiceNo] - [InvoiceDate] as necessary.

  3. Click Save.

Info

You can use the placeholders that are available for the invoice context.