IX. Invoice Overview
Invoice: The Invoice object in Salesforce will store all details related to these invoices, ensuring accurate tracking of payments and financial records.
Field Label | Field Type | Pick list Value | Description |
---|---|---|---|
Invoice Number | Auto Number | NA | An auto-generated number for the invoice. |
Account | Lookup (Account) | NA | Links to the related account. |
Opportunity | Lookup (Opportunity) | NA | Links to the related opportunity. |
Unit | Lookup (Unit) | NA | Links to the related unit name. |
Payment Plan | Lookup (Payment Plan) | NA | Links to the related payment plan. |
Installment Amount | Currency | NA | Amount for the installment, from the payment plan. |
Installment Date | Date | NA | Date of the installment, from the payment plan. |
Payment Status | Picklist |
Paid, Unpaid, Not Applicable |
Status of the payment. |
Due Date | Date | NA | Due date for the payment. |
Due Days | Formula (Number) | NA | Calculates the number of days overdue: TODAY() – Due_Date__c |
Automations / Flow :
When the opportunity stage is updated to “Sold,” and if the date for the first installment in the Opportunity Payment Plan is today, perform the following actions:
o Create an Invoice: Generate an invoice for the opportunity based on the payment plan details.
o Send Notification: Notify the sales user that the invoice has been created and that they need to take
action.
This process ensures that invoices are generated promptly and that sales users are informed of the necessary next steps.
Steps to Create the Flow:
Step 1: Create a Flow
o Navigate to Setup, In the Quick Find box, type Flow and select Flows.
o Click on New Flow and select Auto-Launched Flow and click Next.
Step 2: Define Details
o Define Start Date, Start Time, and Frequency.
o Choose Object and Filter Conditions as below.
o Object: Opportunity Payment Plan
o Conditions: Install_Name__c != Not Null
Prerequisite: A: Create a formula variable called TodaysDate.
Prerequisite: B: Create a formula variable called DueDate.
Step 3: Fetch Related Opportunity Payment Plan records.
o Add a Get Records element to query the Opportunity Payment Plan.
o Filter Criteria:
Inst_Date__c = TodaysDate
Inst_Name__c != Not Null
Step 4: Add Decision Element
o Add a Decision element to check the conditions:
{!$Record.Inst_Date__c} = TodaysDate
Step 5: Generate Invoice
• Add label, add manually values, select object as Invoice and setup values as below.
Step 6: Save the flow and Test it
o Save and activate the flow.
Test the flow by creating an opportunity payment plan and by using specific date and time.
Once invoice is paid sales user will update the stage as Paid.