Customer migration completed

Event generated when an customer migration finishes and the result is reported. Result can be either SUCCESS or FAIL.

Type: object
Additional properties: false
Domain: migration
Event: customer_outgoing
Version: 1

|
code required

Description: The code of message for systems
Type: string
Example:
MIGR-0001

message required

Description: Message of customer migration result
Type: string
Example:
Customer migration registration approved

migration required

Description: Identifier sent on start of migration process
Type: object
Additional properties: false
Example:

{
    "id": "migration-id",
    "version_date": "2021-08-11T11:25:00.000Z",
    "account_id": "account-migration-id",
    "phase_id": "Rollout_Jan2022"
}
id required

Description: This field is the unique identifier of migration.
Type: string
Example:
migration-id

version_date required

Description: This field is the date of version of migration.
Type: string
Format: date-time
Example:
2021-08-11T11:25:00.000Z

phase_id

Title: This field is the migration phase
Type: string
Example:
Rollout_Jan2022

account_id required

Title: This field is the date of version of migration.
Type: string
Example:
account-migration-id

status required

Title: Migration status
Description: If the result of customer migration was success or not
Type: string
Must be one of the following:
SUCCESS
FAIL
Example:
SUCCESS
FAIL

entity

Title: Pismo generated customer information
Type: object
Additional properties: false
Example:

{
    "account_id": 9999,
    "customer_id": 1234
}
account_id required

Title: Account Identifier
Description: Account identifier generated by Pismo.
Type: integer
Example:
9999

customer_id required

Title: Customer Identifier
Description: Customer identifier generated by Pismo.
Type: integer
Example:
1234

operation

Title: Migration Operation
Description: If the customer migration is a creation or update
Type: string
Must be one of the following:
CREATION
UPDATE
Example:
UPDATE
CREATION

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://pismo.io/events/migration/customer_outgoing-1.json",
    "type": "object",
    "title": "Customer migration completed",
    "description": "Event generated when an customer migration finishes and the result is reported. Result can be either `SUCCESS` or `FAIL`.",
    "examples": [
        {
            "operation": "UPDATE",
            "status": "SUCCESS",
            "code": "MIGR-0001",
            "message": "Customer migration registration approved",
            "migration": {
                "id": "migration-id",
                "account_id": "account-migration-id",
                "version_date": "2021-08-11T11:25:00.000Z",
                "phase_id": "Rollout_Jan2022"
            },
            "entity": {
                "account_id": 9999,
                "customer_id": 1234
            }
        }
    ],
    "required": [
        "code",
        "message",
        "migration",
        "status"
    ],
    "properties": {
        "code": {
            "$id": "#/properties/code",
            "type": "string",
            "description": "The code of message for systems",
            "examples": [
                "MIGR-0001"
            ]
        },
        "message": {
            "$id": "#/properties/message",
            "type": "string",
            "description": "Message of customer migration result",
            "examples": [
                "Customer migration registration approved"
            ]
        },
        "migration": {
            "$id": "#/properties/migration",
            "type": "object",
            "description": "Identifier sent on start of migration process",
            "examples": [
                {
                    "id": "migration-id",
                    "version_date": "2021-08-11T11:25:00.000Z",
                    "account_id": "account-migration-id",
                    "phase_id": "Rollout_Jan2022"
                }
            ],
            "required": [
                "id",
                "version_date",
                "account_id"
            ],
            "properties": {
                "id": {
                    "$id": "#/properties/migration/properties/id",
                    "type": "string",
                    "description": "This field is the unique identifier of migration.",
                    "examples": [
                        "migration-id"
                    ]
                },
                "version_date": {
                    "$id": "#/properties/migration/properties/version_date",
                    "type": "string",
                    "format": "date-time",
                    "description": "This field is the date of version of migration.",
                    "examples": [
                        "2021-08-11T11:25:00.000Z"
                    ]
                },
                "phase_id": {
                    "$id": "#/properties/migration/properties/phase_id",
                    "type": "string",
                    "title": "This field is the migration phase",
                    "examples": [
                        "Rollout_Jan2022"
                    ]
                },
                "account_id": {
                    "$id": "#/properties/migration/properties/account_id",
                    "type": "string",
                    "title": "This field is the date of version of migration.",
                    "examples": [
                        "account-migration-id"
                    ]
                }
            },
            "additionalProperties": false
        },
        "status": {
            "$id": "#/properties/status",
            "type": "string",
            "title": "Migration status",
            "description": "If the result of customer migration was success or not",
            "enum": [
                "SUCCESS",
                "FAIL"
            ],
            "examples": [
                "SUCCESS",
                "FAIL"
            ]
        },
        "entity": {
            "$id": "#/properties/entity",
            "type": "object",
            "title": "Pismo generated customer information",
            "examples": [
                {
                    "account_id": 9999,
                    "customer_id": 1234
                }
            ],
            "required": [
                "account_id",
                "customer_id"
            ],
            "properties": {
                "account_id": {
                    "$id": "#/properties/entity/properties/account_id",
                    "type": "integer",
                    "title": "Account Identifier",
                    "description": "Account identifier generated by Pismo.",
                    "examples": [
                        9999
                    ]
                },
                "customer_id": {
                    "$id": "#/properties/entity/properties/customer_id",
                    "type": "integer",
                    "title": "Customer Identifier",
                    "description": "Customer identifier generated by Pismo.",
                    "examples": [
                        1234
                    ]
                }
            },
            "additionalProperties": false
        },
        "operation": {
            "$id": "#/properties/operation",
            "type": "string",
            "title": "Migration Operation",
            "description": "If the customer migration is a creation or update",
            "enum": [
                "CREATION",
                "UPDATE"
            ],
            "examples": [
                "UPDATE",
                "CREATION"
            ]
        }
    },
    "additionalProperties": false
}
{
    "operation": "UPDATE",
    "status": "SUCCESS",
    "code": "MIGR-0001",
    "message": "Customer migration registration approved",
    "migration": {
        "id": "migration-id",
        "account_id": "account-migration-id",
        "version_date": "2021-08-11T11:25:00.000Z",
        "phase_id": "Rollout_Jan2022"
    },
    "entity": {
        "account_id": 9999,
        "customer_id": 1234
    }
}