...
Create a new Autolaunched Flow (No Trigger).
Add a new input variable that will serve as the unique identifier for each record to process. This input variable is necessary for the Batch Job creation.
Click the New Resource button.
Provide the following details:
Resource Type = Variable
API Name = Desired API Name of the input variable
Data Type = Text
Available for input (under the Availability Outside the Flow) = TRUE
Add a Get Records element to retrieve the exact record where an invoice will be generated.
Make sure to provide the exact object of the record.
Filter the records to be processed based on the stored record in the input variable.
Add a Get Records element to retrieve the Gateway Account of the retrieved record from the previous action as it will be necessary to generate an invoice.
Select Gateway Account as the Object
Filter the records to retrieve ONLY the Gateway Account of the to-be-processed record
Add an Action element to invoke the Invoice API invocable class.
Filter by Type and select Apex Action
Find and select the Invoice API invocable class.
Provide the necessary details:
ersdfdsfAmount (required) = The amount of the record
Currency (required) = The preferred currency to be used
Gateway Account Record (required) = The Gateway Account of the record
Related Record To (optional) = The record ID of the record you want to be linked in the Gateway Invoice. In this case, you can link the to-be-processed record to Gateway Invoice which will be created after the invoice generation.
Related Record To - Field (optional) = The custom lookup field under the Gateway Invoice object that will be populated with the record ID of the linked record.
Token (required) = The token that will be used in the payment processing during the invoice generation. You can use the Token from the Payment Source if your organization is using PosiPay’s Payment Source.
Note: This is a test setup on how to set up Invoice API in Schedule Flow
...