Skip to main content

CMD- Segment Workflow High-Level Design

The CMD Portal - Segment tab will be used to assign or update segments for the customer.

  1. Segment Portal in CMD:

The updated side navigation bar, shown in the screenshot below, now includes segmentation.

When a user clicks the "Add segment" button on the retrieval page, they can select a segment type and value from the list below.

After choosing a segment type and value, users can click the "ADD" button in the model to add multiple segments simultaneously, reducing the number of API calls required.

The screenshot below shows a new segment type. "Attractiveness" and "Key Client" segments use a card view, limiting users to a maximum of five segments (or fewer, as needed). An edit and delete function allows for segment removal.

  1. Segment Tab:

The segmentation details tab now displays a list of segments in a table view after the number of segments is added. This table offers enhanced editing and deletion capabilities; multiple segments can be edited or deleted simultaneously using checkboxes within each row.

Other warnings and alerts will be shown as per current standards.

  1. Segment Workflow High-Level Design: The below diagram shows the high-level segment workflow functional and technical design between the CMD-Segment portal, Ingest API, Workflow Service, and Database

High-Level Flow Between Portal and Ingest Customer:

  • User logs into the portal and performs edits on segments for the customer.
  • The data is sent to ingest customer for processing.
  • First, the system will validate the data, before generate a workflow for segment.
  • Once the data is validated, the system checks if the customer is in the workflow.
  • If the requested customer is a parent customer, the system will check if any of the associated child customers are in the workflow.
    • If yes, the system will display the validation message: "Associated customer is active in workflow and Update segments are not allowed."
    • If no, a workflow will be generated and assigned to the data steward for further action.

High-level Flow between Portal ,Workflow and Ingest Customer:

  • The Data steward logs into the segment portal and ensures they have the necessary roles and access to workflows.
  • The Data steward retrieves the tasks assigned to them for review.
  • Once the task is retrieved, the steward verifies the task.
  • After verification, the steward will decide to approve or reject the task.
  • If approved, the system will promote the segmentation changes and perform segment automation for the customer.
  • Once segment automation is complete, the customer will be published to downstream systems.
  • If rejected, the system will revert the customer’s segment to its previous state and remove the customer from the segment workflow.
  1. Data Base Changes: To implement the segmentation workflow, we need a table to maintain the workflow status of each segment.

customer_segment_workflow

Attribute NameData TypeSample Values
ROW_IDBigSerial12
PROCESS_IDVARCHAR(255)c85c603d-d8b2-11ef-b288-06cdcc0cd50d
CUSTOMER_CMD_CODEVARCHAR(100)IN8983222
SEGMENT_DATATEXT{ "customerCode": "US00566348", "customerAuditData": { "user": "n.n.reddy@maersk.com", "sourceSystem": "PRTL" }, "customerSegments": [ { "brandCode": "MAEU", "segmentClassification": { "segmentTypeCode": "VERT", "segmentValueCode": "OTHR", "segmentValueName": "OTHER" }, "isUnassignSegment": true, "bulkUploadAction": null } ]}
CREATE_USERVARCHAR(255)n.n.reddy@maersk.com
CREATE_TIMETIMESTAMPTZ2025-01-12 18:27:47.169 +0530
UPDATE_USERVARCHAR(255)n.n.reddy@maersk.com
UPDATE_TIMETIMESTAMPTZ2025-01-13 11:27:47.169 +0530
STATUSVARCHAR(100)APPROVEDREJECTED
ERROR_CODEVARCHAR(255)500,400
IS_PENDINGBPCHAR(1)YN
SOURCE_SYSTEMVARCHAR(50)PRTL
COMMENTSTEXT
Was this page helpful?