Removing Accounts from Territories

  • Browser (Lightning)
  • iPad

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.

This feature is not compatible with assignments generated using Salesforce Territory Assignment Rules, including Zip-to-Terr Alignment and Brick-based Alignments.

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 Veeva 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.

Configuring Removing Accounts from Territories on iPad

Additionally, to configure this feature on the iPad:

  1. Create or activate the iPad VMOC for the Data_Change_Request_vod object.

    If a user is assigned to multiple territories, it is recommended to enable Enhanced Sync on the VMOC for the AccountShare object. This ensures that the incremental sync after a successful Remove from Territory request properly updates the territory picklist in the Remove from Territory modal.

  2. Populate the REMOVE_FROM_TERRITORY_DCR_ACCT_TYPES Veeva Setting with REMOVE_FROM_TERRITORY_DCR_ACCT_TYPES;;Feedback.
  3. Navigate to the REMOVE_FROM_TERRITORY_DCR_ACCT_TYPES Veeva Message in the Feedback category.
  4. Populate the text of the Veeva Message with a double-semicolon separated list of Account record type labels that the Remove from Territory button should display on.

    For example, Professional_vod;;Hospital_vod

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 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.

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.

Removing an Account from a Territory on the iPad

On the iPad, DCRs with an initial External_Status_vod field of CHANGE_PENDINGREVIEW display to end users as a pending removal DCR visual indicator next to the Territory Link field.

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 after the next incremental sync and the External_Status_vod field is automatically updates to CHANGE_PROCESSED.

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.

Additionally, alerts are automatically generated to notify iPad users when their submitted removal requests are processed based on the values of the External_Status_vod and Result_vod fields:

External_Status_vod Result_vod Status_vod Displays in My Alerts?
CHANGE_PENDINGREVIEW n/a Submitted_vod Yes
CHANGE_PROCESSED CHANGE_ACCEPTED Processed_vod No
CHANGE_PROCESSED CHANGE_REJECTED Processed_vod Yes

Considerations

  • 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.