Skip to main content

Using the Payment Request Generator

You can manually run the Payment Request Generator to create references, or you can set up an automatic run. If you have not done so already, please read What is the Payment Request Generator? before continuing.

Create a manual run

To create a manual Payment Request Generator Run:

  1. Launch the FinDock app and click the Payment Request Generator Run tab.
  2. Click the New button to define a manual run.
  3. Give the run a name, leave the status as New, and click Save. new_payment_requestgenerator_run
  4. Further specify the generation run as described below:
    • Select Reference & Generator Type: Select the type of reference and generator. Note that the list of payment request types includes the specific processor in parentheses. For most types, there is only one processor option, but for ESR, for example, there are two processors because the reference for LSV+ is not identical to CH-DD.
      Payment request type options
    • Select Source & Mapping: Specifiy the source type and corresponding field mapping.
  5. Click Save & Start Generating to start the reference generation.
  6. Track progress in the Payment Request Generator progress view. paymentrequestgenerator_progress

If there are issues, you will find an error message in this view which can help with troubleshooting. When you have solved the root cause, you can put the status back to New and click Save & Start Generating again to retry.

tip

Our payment reference generator algorithms are designed to never generate the same payment reference twice. FinDock explicitly checks for uniqueness within the scope of a given Payment Reference Generator Run (Batch Apex). However, some types of payment references are relatively short. When you generate large volumes of such references, it is possible, though rare, to end up with duplicates. You can catch duplicates by marking the chosen Reference Field as unique. Salesforce will then enforce uniqueness and prevent duplicate values from being stored in that field.

Create an automatic run

If you insert a Payment Request Generator Run record with status ‘Generated,’ the run starts automatically. All possible ways in Salesforce to create a record (Apex, Flow, Quick Action, etc.) can be used. However, automatic runs can only be done with source type Campaign or Campaign Member.

Example: ESR - Standard

    cpm__Reference_Generator_Run__c run = new cpm__Reference_Generator_Run__c(
    Name = '<anything>',
   cpm__Reference_Type__c = '<see table>',
   cpm__Generator_Type__c = '<see table>',
   cpm__Processor__c = '<see table>',
   cpm__Source_Type__c = 'campaign',
   cpm__Campaign__c = c.Id,
   cpm__Other_Input_fields__c = '{}',
   cpm__Other_Output_Fields__c = '{\"reference-value\":\"My_Custom_Reference__c\"}',
);
insert run;

Example: ESR - Bring Your Own Base Reference

    cpm__Reference_Generator_Run__c run = new cpm__Reference_Generator_Run__c(
Name = 'ESR - Bring Your Own Base Reference',
  cpm__Reference_Type__c = '<see table>',
 cpm__Generator_Type__c = '<see table>',
   cpm__Processor__c = '<see table>',
   cpm__Source_Type__c = 'campaign',
   cpm__Campaign__c = c.Id,
   cpm__Other_Input_fields__c = '{\"base-reference\":\"My_Custom_Base_Reference__c\"}',
   cpm__Other_Output_Fields__c = '{\"reference-value\":\"My_Custom_Reference__c\"}',
   cpm__Status__c = 'Generating'
);
insert run;
Payment Request Typecpm__Reference_Type__ccpm__Generator_Type__c (standard)cpm__Generator_Type__c (custom)cpm__Processor__c
ESRESRESRSFDCRecordIdReferenceGeneratorESRBaseReferenceReferenceGenerator‘PaymentHub-CH-DD’ OR ‘PaymentHub-LSV’
ACCEPTGIROAcceptgiroAcceptgiroSFDCRecordIdReferenceGeneratorAcceptgiroBaseReferenceGeneratorPaymentHub-SEPA