akramit / Identity-Reconciliation

Linking different orders made with different contact information to the same person.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identity-Reconciliation

Linking different orders made with different contact information to the same person. For detailed use case - Read Here

Run Application

  1. Clone the repo Identity-Reconciliation
  2. Go to directory /Identity-Reconciliation
  3. Execute docker-compose up -d
  4. /identify endpoint is exposed at - 0.0.0.0:5432/identify
  5. Send a POST request with JSON body. JSON Body has format
    {
    "email":"email",
    "phoneNumber":"phone"
    }

Tests

SET UP : Fire a POST request - 0.0.0.0:5432/identify

Test 1

INPUT :

{ "email":"mcfly@hillvalley.edu","phoneNumber":"123456" }

OUTPUT :

{
    "contact": {
        "emails": [
           "mcfly@hillvalley.edu"
        ],
        "phoneNumbers": [
            "123456"
        ],
        "primaryContactId": 1
    }
}

RESULT : PASS

Test 2

INPUT :

{ "email":"lorraine@hillvalley.edu","phoneNumber":"123456"}

OUTPUT :

{
    "contact": {
        "emails": [
      
            "mcfly@hillvalley.edu",
            "lorraine@hillvalley.edu"
        ],
        "phoneNumbers": [
            "123456"
        ],
        "primaryContactId": 1,
        "secondaryContactId": [
            2
        ]
    }
}

RESULT : PASS

Test 3

INPUT :

{ "email":"null","phoneNumber":"123456"}

OUTPUT :

{
    "contact": {
        "emails": [
            "mcfly@hillvalley.edu",
            "lorraine@hillvalley.edu"
        ],
        "phoneNumbers": [
            "123456"
        ],
        "primaryContactId": 1,
        "secondaryContactId": [
            2
        ]
    }
}

RESULT : PASS

Test 4

INPUT :

{ "eml":"null","phone":"123456"}

OUTPUT:

{"error": "Invalid JSON data. Missing Parameters"}

RESULT : PASS

About

Linking different orders made with different contact information to the same person.

License:MIT License


Languages

Language:Python 98.7%Language:Dockerfile 1.3%