Skip to main content

Overview of the Customer Ingest API

smds-cmd-ingest-customer-service

Ingest customer

A service for the creation/updation of customers with various parameters.

Portal Flow

Search if customer name exists -> BVD search -> Start creation process -> choose Address from Azure Maps -> Tax + M&A (Business Details) -> Internal customer? ->BE code -> recheck details -> submit

customerRequest Payload

Field NameValue TypeRequired
customerAuditDataObjectYes
customerCodeString
tradingNameStringYes
legalNameString
customerLocalNameString
customerTypeString
customerGroupTypeString
customerExternalSystemIdentifiersObjectYes
customerStatusObject
urlString
communicationNumberObject
invoiceISOLanguageCodePreferenceString
isBrokerageBoolean
isForwardersCompensationBoolean
customerWorkflowIndicatorString
isSoleProprietorBoolean
customerAddressObjectYes
isWorkflowPendingBoolean
workflowInformationString
customerIdentifiersObject
customerWebBillLadingsObject
customerBrandsObject
customerEnrichedInformationObject
bvdRelationshipsObject

Customer Request payload

customer_information table (Write DB - Postgres)

FieldValue
Customer Cmd CodeIN03812088
Customer Role TypeCustomer
Legal Name
Trading NameNEW COMPANY FOR TRIAL
Customer Group TypeS
Customer Status CodeZEXC
Account Group Type
Customer Websitehttps://www.maersk.com
Email Address
Invoice Language CodeEN
BROKN
FOFMCN
Is Sole ProprietorN
VIP Non Roll
Street NoAVE 1
Address Line 1JJHHJH
P.O. BoxPO 123
Address Line 27TH D BUILDING
Address Line 3RAMWADI
DistrictRAMWADI
CityPUNE
City Code
Postal Code411014
State CodeMH
State NameMAHARASHTRA
Country CodeIN
Country NameINDIA
Latitude18.5518236
Longitude73.9592893
Phone TypeTEL
ISD Country CodeIN
ISD Dialing Code91
Extension Number
Phone Number9045638121
Is PendingY
Is DeletedN
Create Time2025-01-27 09:25:21.813+00
Create Usershreya.shree.s@maersk.com
Update Time2025-01-27 09:25:45.435+00
Update Userxyz@crb.apmoller.net
Source of Last UpdatePRTL
Interaction ID
Source of Create

The newly add fields are enriched as the program is running through various functions and 3rd party calls using the customerState.

Data Model

The final data, from each of these tables, is sent to the Read DB (ElasticSearch) and published to EMP Retina (Kafka)

API endpoints:

  1. CREATION of customer
  1. VALIDATION of customer payload

_________________________________________________________________________________

Customer Ingestion- Creation of a new customer

  1. Data Validation

  2. Processing

  3. Save to Write DB And sync to Read DB and publish to Kafka

  4. Validation The validation process is initiated via

    • a POST request to /validate-customer (through Validate customer controller) or
    • called at the time of customer creation

The customer payload that needs to be validated, follows these steps:

  • The customer code field is checked if empty. (indication if it is to validate create or update customer records)
    • If not empty, checks if the customer code in workflow
  • If empty, starts with the following validations
    • Country Validation
      • checks if country code part of the country database
    • Source system
      • checks against reference data if a valid source system is entered
    • External System Identifiers Validation
      • Validate external identifier code against reference data
      • whether BE is already taken
    • Format Validation for Core Customer Attributes
    • Region Validation
    • City Validation
    • Custom Rules Validation
      • Customer Code
      • Website
      • Customer Address Rules
      • Status Reason Rules
  • Language Code: Validate against country-specific accepted language codes reference data.
  • Workflow Rules: Check the workflow indicator attribute against accepted values
  • Source System Rules:
    • Customer creation from BVD source is restricted.
  • Telecommunication Validation
    • Format check
    • Country check
    • External API: Informatica.
  • Customer Identifiers Validation (TAX – PAN/GST)
  • Customer Brands Validation (M&A)
  • SCPI Source-Based Validation
    • Primary email is mandatory for SCPI customer creation
  1. Processing
  • Checks for customer duplicacy
  • Check for any ignored states (restricted country RU)
  • Check customer code is empty
    • If Not, enrich data from DB
    • If yes, check if customer in workflow
      • If customer in workflow, and it’s a create scenario, update the latest date for updation or creation and save to DB.
        • Validate SCPI (email should be present)
        • Validate workflow details
      • If customer not in workflow, persist customer data to DB
  • Insert the data into customer BVD sync Tracker for newly created customer code.
    • Call for any existing customer code in BVD tracker DB
      • If existing customer code, Update Bvd sync tracker records and Bvd Id
      • Else, add Bvd sync tracker records
    • Save and Flush to BVD Sync tracker DB
  • Check for any validation errors while persisting
  • Sync and Publish to Write DB(Elastic Search) and EMP Retina
  • Check if customer in workflow
    • In workflow, return cannot edit/create customer in workflow
    • Else Return Record <customerCode &gt; created successfully

Other Endpoints

o Add parent child relationships between customers

o Request Body customerAuditData and customerRelationships field

  • Identify Internal Customer

POST http://localhost:8080/global-mdm/customers/customer-types-queries

o To identify whether customer is internal or not

o Needs a request Body customerTaxIdentifiers fields (identifierCode, identifierValue, isoCountryCode)

o To validate country ruleset for a particular country

o Request path needs rule set ID

o To validate customer identifiers based on country rules or VIES(for European countries)

o Request body requires customerIdentifierValidationData fields(identifierCode, identifierValue, isoCountryCode)

o Returns IN1234 : Valid XY76765 : Invalid

o For Ingest Customer - Updation

o Request Path requires customer code and a request body with the whole customer payload

o API to Update Customer Status

o Request Path needs customer code and Request body with customerAuditData, customerStatus("statusCode", "customerStatusReasons"), and action ("SUSPEND-TO-ACTIVE")

o Request body needs customer code

o Real time auto sync customer of customer data to the Read db (elastic search from Write DB - Post gres)

Customer Creation Flow

Customer Validation Flow

Update customer Flow

Update customer status

Validate Customer icentifier

Fetch Country Ruleset Flow

Create or Update Customer Relationships Flow

Identify Internal Customer Flow

Sync Customer Flow

Was this page helpful?