Overview
If you have the Orders & Inventory package installed, use the information in this article to create a Low Inventory Alert flow. Before creating the flow, an Email Template will need to be created, along with several other steps, which are included in this article. Complete the process in the order that is listed below.
- Create an Email Template
- Configure an Email Alert
- Create a Custom field on the Inventory Quantity Available object
- Create the Low Inventory Alerts Flow
Create an Email Template
- From the App Launcher, enter Email Template. Then, select Email Templates.
- From the upper right side of the screen, click New Email Template. The New Email Template dialog box displays.
- Enter an appropriate Email Template Name, such as Low Inventory Alert.
- From the Related Entity Type drop-down list, select Inventory Quantity Available.
- From the Folder drop-down list, select Public Email Templates.
- Enter a Subject, such as Low Inventory Alert.
- Enter the email body (see a sample Lightning email body below).
The available quantity for the following Inventory Quantity Available is below the alert Level:
Product: {{{AcctSeedERP__Inventory_Balance__c.AcctSeedERP__Product__c}}}
Warehouse: {{{AcctSeedERP__Inventory_Balance__c.AcctSeedERP__Warehouse__c}}}
Location: {{{AcctSeedERP__Inventory_Balance__c.AcctSeedERP__Location__c}}}
Available Quantity: {{{AcctSeedERP__Inventory_Balance__c.AcctSeedERP__Available_Quantity__c}}}
Alert Level Qty: {{{AcctSeedERP__Inventory_Balance__c.Alert_Level_Quantity__c}}}
Note: Click here to view the above image in full screen.
- Click Save. The newly created email template displays.
Note: Click here to view the above image in full screen.
Configure an Email Alert
- Click the Gear icon and select Setup.
- From the Quick Find textbox, enter Email Alerts. Then, select Email Alerts.
- Click New Email Alert.
- In the Description field, enter Low Inventory Alert. Then, click in the Unique Name field to display the same name.
- From the Object drop-down list, select Inventory Quantity Available.
- In the Email Template field, search for and select the newly created template: Low Inventory Alert.
- Select the appropriate recipient(s).
Note: Click here to view the above image in full screen.
- Click Save.
Create a Custom field on the Inventory Quantity Available object
- Click the Gear icon and select Setup.
- Click the Object Manager tab. Then, enter Inventory Quantity Available in the Quick Find search textbox.
- Click Fields and Relationships, and then click New.
- Under Data Type, select the Number radio button.
- Click Next.
- From the Field Label, enter Alert Level Quantity.
- Enter 12 as the Length and 6 in the Decimal Places field.
- Click Next.
- Select the appropriate profile(s) to provide permission.
- Click Next.
- Add to the appropriate page layout.
- Click Save.
Create the Low Inventory Alerts Flow
- To create a new flow, click the Gear icon and select Setup.
- Enter Flow in the Quick Find textbox, and click Flows.
- Click New Flow.
- Select Start From Scratch.
Note: Click here to view the above image in full screen.
- Click Next.
- Select Record-Triggered Flow, and click Create.
- From the Object drop-down list, search for and select Inventory Quantity Available.
- From the Configure Trigger section, select the A record is created or updated radio button.
Note: Click here to view the above image in full screen.
- In the Set Entry Conditions section, select Formula Evaluates to True from the Condition Requirements drop-down list.
- Enter the formula below.
({!$Record.AcctSeedERP__Available_Quantity__c} - {!$Record.Alert_Level_Quantity__c}) <= 0
Note: Click here to view the above image in full screen.
- From the left panel, click the plus sign (+) in the flow, and select Send Email Alert.
- Search for and select the newly created email alert.
Note: Click here to view the above image in full screen.
- In the Label field, enter Low Inventory Alert. Click in the API Name to display the same name.
- From the Record ID field, enter Triggering in the search textbox. Then, select Triggering AcctSeedERP_Inventory_Balance_c.
- Scroll down and select Record ID.
The Record ID field should display as below.
Note: Click here to view the above image in full screen.
- Click Save.
- Enter a Flow Label and click in the Flow API Name field.
- (Optional) Add a Description.
- Click Save.
- Click Activate.
Comments
0 comments
Please sign in to leave a comment.