Superbadge を獲得すると、学習したスキルを複雑な現実世界のビジネス上の問題に適用して活用することができます。これらの評価には、より高いレベルのスキルと知識が求められます。手順どおりに進める Challenge とは異なり、完了までにより多くの時間がかかることもよくあります。
Design Flow Interactions with Assignment Rules and Custom Metadata
Case 5623
The sales team is having trouble properly assigning leads across queues. The team wants to automatically assign leads to one of two queues based on the lead’s country. The following configuration already exists in the org:
- A custom field called Region (API Name
Lead.Region__c) - Two queues representing the two regions:
- Sales EMEA (API Name
Sales_EMEA) - Sales APAC (API Name
Sales_APAC)
- Sales EMEA (API Name
- A custom metadata type called Region (API Name
Region__mdt) with two fields, APAC and EMEA - A lead assignment rule Region Assignment that will assign leads to either queue based on the lead’s region
Create a record-triggered flow called Set Lead Region to set the lead record’s Region based on the lead’s Country field (API Name Country) by referencing the custom metadata type. The flow should evaluate leads with a country value when they are created or updated, and leads should be reevaluated if the country value changes. Use the following logic for the entry criteria: 1 AND (2 OR 3) where:
Countryis not an empty string.IDis null.Countryis changed.
Refer to the following requirements for the automation.
- Retrieve the Region custom metadata, which associates the following countries with a respective region.
- EMEA: ZM, GB, AE, ES
- APAC: AU, NZ, JP, KR
- EMEA: ZM, GB, AE, ES
- Determine whether the lead’s country is included in the EMEA or APAC region.
- Don’t update the lead record if the lead’s country isn’t one of the countries included in either region.
- Update the lead record’s Region field with
EMEAorAPACvalues.
Save and then activate the flow. The existing Lead Assignment Rule called Region Assignment will assign leads to the respective queue. To test your work, confirm that the assignment rule can reference the updated Region value on a new lead.
