Send Email in Flow (using the new Send Email Action like log email on send, provide template ID etc.) #inSalesforce
Send Email in Flow (using the new Send Email Action like log email on send, provide template ID etc.) #inSalesforce
Scenario: Send an email when the allowed contact limit exceeds on Account
Prerequisite:
ContactLimit field on Contact
Create a record-triggered flow
Object: Contact, On Create and update
Criteria: Account does not equals false
Action and Related Records
GET:
getAllRelatedContacts
Object: Contact
Criteria: Account equals Record.Account
All, ..
Decision:
Isnullfalse
ISNOTNull: getAllRelatedContacts isnull false
ISNUll: END
ISNOTNull:
Assignment of number of Contacts
Variable - Counter (Number),0 decimal
Equals Count getAllRelatedContacts
Decision:
ContactLimitExceeded:
No:
Counter < record.Account.ContactLimit
Yes:
Send Email Action
Provide Label
Body: Text Template
The account {record.account.name} related contact limit exceeded
Recipient Address list:
record.account.owner.email
Related Record id: record.account
Log Email on Send: True
Rich text: True
Subject: Limit Exceeded on Contacts allowed on Account
Save, Debug and Activate. Test it
Comments
Post a Comment