Removing Accounts from Territories

  • Browser (Lightning)

Users can quickly remove accounts from their territory via a dedicated button on the Account detail page. This button prompts the user to create a DCR to remove the account from their territory, which can include a reason for removal. The DCR can then be routed via the Salesforce Approval Process for additional review and approval.

For example, Sarah Jones attends a conference where she speaks with Dr. Ackerman about Cholecap. She needs to record this interaction for compliance reasons, however, Dr. Ackerman is not an account currently in her territory. She adds Dr. Ackerman to her territory via Global Account Search and logs the interaction. Later, she removes Dr. Ackerman from her territory since she no longer needs access to Dr. Ackerman’s account.

Considerations

  • Account assignments are only removed from the user’s territory when the DCR is accepted
  • In order to provide users immediate feedback on their request to remove an account from their territory, it is recommended to setup a Flow or Approval Process to automatically approve or reject DCRs created via this feature
  • To ensure DCRs are not accidentally sent to Veeva Network, DCRs created by this feature have a Network_Customer_Master_Mode_vod field of 0. Admins should verify any integrations with external systems when using Decoupled DCRs with this feature to ensure DCRs created by this feature are not accidentally sent to external systems.
  • This feature is not compatible with Zip-to-Terr, since the Remove from Territory button deletes associated ObjectTerritory2Association (OT2A) records for approved DCR requests. Salesforce prevents OT2A records from being deleted when they are generated from Assignment Rules.
  • If an org uses the Account Territory Loader (ATL) to manage territories, approved DCRs also remove the territory from the Territory_vod field of the appropriate Account_Territory_Loader_vod record

Configuring Removing Accounts from Territories

To configure this feature:

  1. Grant all users the following permissions:

    Object

    OLS

    Record Types

    Fields

    FLS

    Data_Change_Request_vod

    CRU

    Remove_From_Territory_vod

    • Account_vod
    • Challenge_Reasons_vod
    • Territory_vod
    • Territory_Label_vod
    • Status_vod
    • External_Status_vod
    • Sent_Datetime_vod
    • Network_Customer_Master_Mode_vod

    Edit

    • Result_vod
    • Resolution_Note_vod
    • Response_Datetime_vod

    Read

  2. Grant all users access to the VeevaRemoveFromTerritoryController Apex class.
  3. Ensure the DATA_CHANGE_REQUEST_MODE_vod Network Setting is not 0.
  4. Add the Remove from Territory Lightning Quick Action to the appropriate Account object page layouts.
  5. Assign the Remove From Territory Data_Change_Request_vod object page layout to the Remove_From_Territory_vod record type.

    Marking the Challenge_Reasons_vod field as Required on this page layout causes the user to need to enter a reason before submitting the DCR.

  6. Edit the text that displays to users by cloning and editing the following Veeva Messages. See Veeva Messages for best practices when editing Veeva Messages. This step is only required if admins want to update the messages from the default text:

    Veeva Message

    Displays

    Default Text

    REMOVE_FROM_TERRITORY_WARNING

    In the modal after users select the Remove from Territory button.

    Removing this account can cause other related accounts to be removed from your territory.

    REMOVE_FROM_TERRITORY_ACCEPTED_RESOLUTION_NOTE

    In the Resolution_Note_vod field of an approved Remove from Territory DCR.

    Account successfully removed from territory.

    REMOVE_FROM_TERRITORY_REJECTED_RESOLUTION_NOTE

    In the Resolution_Note_vod field of a rejected Remove from Territory DCR.

    The request to remove the account from your territory has been rejected.

Removing an Account from a Territory

To remove an account from a territory:

  1. Navigate to the appropriate account.
  2. Select Remove from Territory.

    An error displays if users select this button on an account they are not currently aligned to. This feature only supports removing Territory2Manual OT2A records.

  3. Select the appropriate territories to remove the account from if the account and user are assigned to multiple territories.

    Separate DCRs are created for each selected territory.

  4. Select the appropriate Challenge Reason. Values available for selection are based on the values of the Challenge_Reasons_vod picklist on the Data_Change_Request_vod object.

  5. Select Submit.

Created DCRs have an initial External_Status_vod field of CHANGE_PENDINGREVIEW. If the Result_vod field is updated to CHANGE_ACCEPTED, either manually or via an automated process, the account is removed from the requesting user’s territory.

If the org is connected to an instance of Align, account_exclusion__aln records are automatically created for accepted DCRs to reflect the removal. See Removing Accounts from Territories in CRM and Align for more information.