AccountManagerOrgUnitBased
Manage account managers based on org unit customers and org unit users. By using the org unit customer and org unit user records, the batch adds, modifies, or removes the account managers for an account. When there are changes in the org unit assignments of customers and users, or you change the org unit structure. This batch job makes sure that each account is updated with the correct account managers based on the latest org unit structure. The AccountManagerOrgUnitBased batch saves the administrative effort to update each account manually and you can make org unit changes with a quick turn-around.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions where Consumer Goods Cloud is enabled |
Considerations
Keep these considerations in mind during the batch run.
- The batch runs ad-hoc or can be scheduled periodically and Salesforce runs the batch at the given time interval. If the batch is scheduled, it runs with a batch size in the corresponding batch process configuration record. If no batch process configuration record is found, it runs with the default batch size in the class, which is 200. Batch process configuration records are shipped via static resource CSV files during the org setup.
- The number of customer and user combinations per org unit must be less than 4,800. See General Limits.
- The AccountManagerOrgUnitBased batch job prevents issues such as duplicate user assignments and multiple main managers for a single account by observing and recalculating customer manager records. It checks for overlapping situations such as when the same user is included multiple times in the same period for the same account, and when more than one main manager is assigned in the same period for the same account. In such cases, the batch job makes sure that customer manager records by the batch take precedence over manually created records and deletes the manually created records. Additionally, the most recent managers created by the batch take precedence over those created or calculated previously from another or the same org unit. As a result, the batch deletes some managers to resolve these overlapping issues.
Batch Job Details
The batch initially retrieves all org units. For each org unit, the batch process
- Retrieves users assigned to org units.
- Retrieves active customers assigned to org units.
- Finds active customer managers with a management type other than Substitution. These managers must be related to the accounts in the previous step or to the org units recalculated initially.
- Adds, modifies, or removes customer manager records depending on the recalculation to prevent duplicates.
Here are the org units, org unit customers, and org unit users for NTO Stores.
Org Units
| Name | Sales Org |
|---|---|
| California | 0001 |
Customer Org Units
| Org Unit | Customer | Active | Valid From | Valid Thru |
|---|---|---|---|---|
| California | NTO 201 | Checked | 1/1/2000 | 1/1/2099 |
| California | NTO 202 | Checked | 1/1/2000 | 1/1/2099 |
Org Unit Users
| Org Unit | User | Main | Valid From | Valid Thru | Management Type |
|---|---|---|---|---|---|
| California | Chantelle Rep | Checked | 1/1/2024 | 1/1/2024 | Sales |
| California | Lisa Xin | Unchecked | 1/1/2024 | 1/1/2030 | Sales |
The batch creates these customer managers.
Customer Managers
| Account | User | Valid From | Valid Thru | Main | Org Unit | Active | Management Type |
|---|---|---|---|---|---|---|---|
| NTO 201 | Chantelle Rep | 1/1/2024 | 1/1/2024 | Checked | California | Checked | Sales |
| NTO 201 | Lisa Xin | 1/1/2024 | 1/1/2030 | Unchecked | California | Checked | Sales |
| NTO 202 | Chantelle Rep | 1/1/2024 | 1/1/2024 | Checked | California | Checked | Sales |
| NTO 202 | Lisa Xin | 1/1/2024 | 1/1/2030 | Checked | California | Checked | Sales |

