Loading

Troubleshoot issues with Auto-assignment in Maps

Fecha de publicación: Sep 16, 2024
Descripción
Learn how to review your Auto Assignment settings and troubleshoot the issues with record assigning.
Solución


Prerequisites:

 

Geocoding Records

Start by reviewing your records to see if they have been geocoded. Specifically, records need a valid latitude and longitude value. For example, check for this on one of your Account records:

  1. Open one of your Salesforce Account Records.

  2. Check if Latitude and Longitude fields have their values entered.

Note: Your Latitude and Longitude fields might be hidden from a current Page Layout

If the Record has latitude and longitude values available and valid, it should work correctly with auto-assignment.

If your records do not have a Latitude and Longitude value, you should ensure they are geocoded. This is as simple as plotting the record within Salesforce Maps (see Plotting a Marker Layer ). If you find that a record is not geocoding, review Creating a Base Object.

 

Latitude and Longitude Field Configuration

You also need to verify that your records have the latitude and longitude fields properly configured. For example, Account records have both Billing Latitude/Longitude and Shipping Latitude/Longitude fields available. Depending on how you set up your Base Objects within Salesforce Maps, you need to ensure Auto Assignment's configuration points to the correct fields.

For example, suppose your Account records have the latitude and longitude values stored on the Shipping Latitude/Longitude fields. If Auto Assignment is pointing to the Billing Latitude/Longitude Fields, the record may not assign properly. To fix this, navigate to your Assignment Plan.

  1. Open Salesforce Setup.

  2. Navigate to Installed packages.

  3. Click Configure near your Salesforce Maps package.

  4. Choose Auto Assignment from the sidebar on the left.

  5. Create / Edit your Assignment Plan.

  6. Assure that the Latitude Field and Longitude Field values and make sure they’re correctly mapped.

Notice the Latitude and Longitude fields show a list of available number fields on the record. You should ensure these point to the appropriate fields (it would be easy to accidentally reverse these, or point them to the wrong fields).

 

Reassigning Records

Suppose you've assigned a set of records. You may find it necessary to reassign them to another user. Note that if you just create a new Assignment Rule and run the Assignment Plan, you may not see your records change owners. Why is this?

The Auto Assignment batch will skip records that have already been assigned once. This behavior keeps your Salesforce organization efficient by keeping it from running unnecessary processes. In order to allow your records to be assigned again, review Updating the Auto Assignment Fields.

 

Capturing the error messages related to the Auto Assignment Plan

After running the Auto Assignment plan, you may see the plan failed for some reason. You can navigate to the Plan run record from Installed Packages -> Salesforce Maps-> Configure-> Auto Assignment and then click on the Scheduled Plans tab. From there, locate the AA plan that has failed and click on the Plan name to get the detailed error messages. Below are a few  examples of error messages you might see:

  • No territory Intersects with the point (x, y): This is normal behavior. The record was not found within the given territory.
  • Successfully Found an intersecting territory for the record, but an error occurred during the DML update: There may be an active validation rule on the record you're attempting to assign. (It is common for Salesforce Admins to prevent certain users from changing the ownership of certain records).
  • Callout Error: There may be some connectivity issue with Salesforce Maps or our servers.
  • Invalid Latitude or Longitude: This error is triggered while using the custom number fields as Latitude and Longitude in the assignment plan and if the Latitude coordinates don't fall within the -90 to +90 range or the longitude coordinates don't fall within the -180 to +180 range.
  • Bad Request Status Code and error message as"Missing required property from request body","data":{"property":"/rules/1/shape/id"}: This error is triggered when there are no geometries (boundaries) in Shape layer mapped in the assignment Rule. Shape layers used for auto assignment rules should be reviewed in Maps.
  • Note: If the user assigned in the Rule gets deactivated, Admin should review the Assignment Plans and deactivate assignment rules or modify the user.


Note: You can also report on the records where auto-assignment couldn't assign records because of invalid Latitude or Longitude values. In order to do so, create a Text Area field on the desired object and Map this field on the Assignment plan under Notification Field. Once the assignment plan runs, if any records fail to get assigned due to invalid Latitude or Longitude, the error will be written back to the records in the text area field.

 

Shape Layer Builder

In order to start working with Auto Assignment, you need to create a Shape Layer. This might be a territory your users work in. Name the Shape Layer something descriptive.  If records seem to meet the criteria but aren't updated, it could be because the wrong shape layer is linked to the rule due to duplicate names. To avoid this, always use unique names, especially when publishing from Territory Planning, to ensure your assignment rules stay in sync with the correct shape layers.

Auto Assignment also works for drawn shapes, such as those created with the Square, Circle, and Polygon tools in addition to shapes created with the
Shape Layer Builder.

 

Common Errors

An “Apex CPU Time Limit Exceeded” error is commonly caused by running an Assignment Plan that contains a large number of zip codes as the timeout occurs during the processing of the shape geometries from all of the rules included in the plan. As a best practice, one Assignment Plan should not contain more than 10,000 zip codes. If this error occurs, please try decreasing the Auto Assignment batch size as a first step. This setting is found by navigating to the Setup => Installed Packages => Configure next to Salesforce Maps => Advanced tab on the left-hand side => Batch Process tab. If this does not alleviate the issue, please consider breaking your assignment plan into multiple, smaller plans or substitute zip codes for states where applicable.
 

A “Too Many Query Rows: 50001” error is spawned once the execution governors and limits of 50,000 records retrieved by SOQL queries are met. If this error occurs, please try decreasing the Auto Assignment batch size. This setting is found by navigating to the Setup => Installed Packages => Configure next to Salesforce Maps => Advanced tab on the left-hand side => Batch Process tab.

Recursos adicionales
Número del artículo de conocimiento

000380820

 
Cargando
Salesforce Help | Article