Skip to content

Enabling SEPA Mandate Payment Instruments

JustOn makes use of Payment Instrument records to hold the SEPA Direct Debit Mandate information for accounts. If there is an active payment instrument set for an account, JustOn uses the following fields of the payment instrument for the SEPA export: IBAN, Direct Debit Mandate Granted and Direct Debit Mandate Reference. If there is no active payment instrument, this information is taken from the invoice or the account.

You can create and update account-specific payment instruments based on the SEPA-related information available on the account using a dedicated process. Once created, the payment instruments are accessible via the corresponding related list on the account detail page.

Enabling SEPA Direct Debit Mandates as payment instruments involves

Configuring SEPA Mandate Reference Counter

JustOn requires the specific invoice counter MandateReferencePaymentInstrument to act as the SEPA mandate reference counter. Once set up, the SEPA mandate reference for the payment instrument is set automatically by the process on creation or update.

  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: MandateReferencePaymentInstrument
    • Template: Specify the pattern as necessary.


      The resulting mandate string can contain up to 35 characters. The allowed characters include the alphanumeric characters a-z A-Z 0-9, the punctuation and symbol characters +?/-:().,' and the space character.

      Note that there is no support for custom placeholders with SEPA mandate reference counters.

  5. Click Save.

Creating Process for Managing Payment Instruments

Creating or updating SEPA mandate payment instruments requires a process that calls the appropriate Apex class provided by JustOn. The process criteria that start the execution depend on your use cases. For example, you can configure the process to run when the IBAN of an account is modified.

When the defined criteria are met, the process can, generally

  • Create a new Payment Instrument record with the IBAN, Direct Debit Mandate Reference and Direct Debit Mandate Granted fields populated, which will be used on SEPA XML export,
  • Deactivate an existing payment instrument and create a new one if a new IBAN value is available,
  • Deactivate all payment instruments if the IBAN value is empty.

If applicable, the process sets the active payment instrument in the Account field Current SEPA Mandate.

The source object for the process depends on the object to be monitored for changes to the SEPA-related information – usually Account or Invoice.

  1. In Setup, open Process Builder.

    In Salesforce Lightning, navigate to Process Automation > Process Builder.

    In Salesforce Classic, navigate to Create > Workflow & Approvals > Process Builder.

  2. Click New.

  3. Specify a (descriptive) process name.
  4. Set the process to start when A record changes.
  5. Configure the process as required.

    To trigger the process when the IBAN of an account is modified, for example, specify:

    Step Option Value
    Add Object Object Account
    Start the process when a record is created or edited
    Add Criteria Criteria Name New SEPA data
    Criteria for Executing Actions Conditions are met
    Set Conditions [Account].ON_BankAccount__c Is changed True
    Add Action Action Type Apex
    Action Name Update SEPA payment instrument
    Apex Class Manage Payment Instrument records for SEPA
    Set Apex Variables Account Id Field Reference [Account].Id
    IBAN Field Reference [Account].ON_BankAccount__c
  6. Click Save.

  7. Click Activate.

    This triggers JustOn to execute the process when the IBAN of an account is modified.


    Depending on your use cases, the process setup and the objects to involve may vary.

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