3.3 Segmentation Batch

This batch will assign either one or multiple segments to new accounts and update (add/remove) segments to existing accounts in collections. Segments will be assigned/removed based on the selections criteria maintained in segment maintenance. Each segment can have multiple active strategies. If a segment is created, then all its active strategies are created on the account. If an account already has active segment/s, however during re-segmentation, if active segment is not part of the newly identified segments, then this batch will close those segments for that account.

Segmentation batch is currently run as three sub-batches.
  • Batch 1:

    This batch will get all segment related facts for all active accounts which are in collections and having next review date <= application date or override date.

    Job Name: obcr-segment-account-facts

    Setup Prerequisites

    Following is the prerequisite for the setup:

    Data is available in table DM_ACCOUNT_REVIEW.

    Dependent Batch/Job: Not Applicable

    Multi-threaded: Yes

    Multi-stream: Yes

    URI : <protocol>:// obcr-segmentation-batch-services/jobLauncher/runBatch/

    Table 3-5 Mandatory Headers

    Parameter Name Value Mandatory Description
    userld ADMINUSER1 Yes User Id of the requesting user.
    appld CRSEG Yes The application ID of the host service.
    branchCode DMO Yes Branch Code of the requesting user.
    entityId DEFAULTENTITY Yes Entity ID of the request.
    Accept Application/json Yes Content Type of the request.

    Specify following parameters while executing this batch:

    Table 3-6 Parameters

    Parameter Name Value Mandatory Description
    runDate 01102023 Yes It must be in ddmmyyyy format.
    branchCode DMO Yes Branch code of the project.
    userId ADMINUSER1 Yes User id of the user.
    overrideDate 2023-10-01 No It must be in yyyy-mm-dd format. It is required to run the batch for a specific day.
  • Batch 2:

    This batch evaluates all active segment rules against each account and assigns/removes segment.

    Job Name:obcr-account-segmentation

    Setup Prerequisites

    Following is the prerequisite for the setup:

    Batch 1 which is obcr-segment-account-facts must be completed before this batch.

    Dependent Batch/Job: obcr-segment-account-facts

    Multi-threaded: Yes

    Multi-stream: Yes

    URI : <protocol>:// obedm-segmentation-batch-services/jobLauncher/runBatch/

    Table 3-7 Mandatory Headers

    Parameter Name Value Mandatory Description
    userld ADMINUSER1 Yes User Id of the requesting user.
    appld CRSEG Yes The application ID of the host service.
    branchCode DMO Yes Branch Code of the requesting user.
    entityId DEFAULTENTITY Yes Entity ID of the request.
    Accept Application/json Yes Content Type of the request.

    Specify following parameters while executing this batch:

    Table 3-8 Parameters

    Parameter Name Value Mandatory Description
    runDate 01102023 Yes It must be in ddmmyyyy format.
    branchCode DMO Yes Branch code of the project.
    userId ADMINUSER1 Yes User id of the user.
    overrideDate 2023-10-01 No It must be in yyyy-mm-dd format. It is required to run the batch for a specific day.
    noOfDaysForNextRun 1 No It is required if you want to exclude accounts for few days from re-segmentation. Its default value is 1.

Success/Failure Details:

User can verify the record level status in DM_SEGMENT_ACCOUNTS and DM_SEGMENT_ACCOUNT_FACTS tables in CR_SEG schema. For a successful processing of a record, the below condition should be satisfied.

ERROR_CODE = ‘Success’ and PROCESS_RESULT = ‘1’