Legacy events
  • 08 Aug 2023
  • 6 Minutes to read
  • PDF

Legacy events

  • PDF

Article summary

Introduction

The payload of an event will consist of two parts:

  • General fields
  • Event specific fields, nested within the detail field

The general fields of an event are described below.

FieldTypeDescription
versionStringVersion of the event, typically set to 0.
idStringUnique identfier of the event.
detail-typeStringType of the event.
sourceStringOriginating system of the event. For events originating from Connect, the value will be no.mediaconnect.connect
accountStringAWS account number.
timeStringTimestamp of the event.
regionStringAWS region that sent the event.
resourcesString arrayAWS resources involved in the event. This field will typically be an empty array.
detailJSON objectEvent specific fields.

Subscription start event

Event type

SUBSCRIPTION_START

Description

This event is generated by Connect when a new subscription product is started on a customer. This means that the specified customer has become active on the given product.

Event specific fields

FieldTypeDescriptionNullable
schemaStringIdentifier of Connect schema that generated the event.No
customerIntegerConnect customer number related to the event.No
productStringProduct code of the subscription that has started.No
periodEndIntegerEpoch timestamp in milliseconds for end of current subscription period.Yes

Example payload

{
  "version": "0",
  "id": "44e4dfe0-fb98-536d-0d55-a16b7770d1ae",
  "detail-type": "SUBSCRIPTION_START",
  "source": "no.mediaconnect.connect",
  "account": "408193426112",
  "time": "2022-01-19T13:07:17Z",
  "region": "eu-north-1",
  "resources": [],
  "detail": {
    "schema": "CNxx",
    "customer": 12345,
    "product": "PROD1",
    "periodEnd": 1610665200000
  }
}

Subscription stop event

Event type

SUBSCRIPTION_STOP

Description

This event is generated by Connect when a subscription product is stopped on a customer. This means that the specified customer has become passive on the given product.

Event specific fields

FieldTypeDescriptionNullable
schemaStringIdentifier of Connect schema that generated the event.No
customerIntegerConnect customer number related to the event.No
productStringProduct code of the subscription that has stopped.No

Example payload

{
  "version": "0",
  "id": "44e4dfe0-fb98-536d-0d55-a16b7770d1ae",
  "detail-type": "SUBSCRIPTION_STOP",
  "source": "no.mediaconnect.connect",
  "account": "408193426112",
  "time": "2022-01-19T13:07:17Z",
  "region": "eu-north-1",
  "resources": [],
  "detail": {
    "schema": "CNxx",
    "customer": 12345,
    "product": "PROD1"
  }
}

Subscription renewal event

Event type

SUBSCRIPTION_RENEW

Description

This event is generated by Connect when a subscription product has been renewed on a customer. This implies that the renewal counter for the product (smsm.rencount) has been increased.

Event specific fields

FieldTypeDescriptionNullable
schemaStringIdentifier of Connect schema that generated the event.No
customerIntegerConnect customer number related to the event.No
productStringProduct code of the subscription that has been renewed.No
periodEndIntegerEpoch timestamp in milliseconds for end of current subscription period.Yes

Example payload

{
  "version": "0",
  "id": "44e4dfe0-fb98-536d-0d55-a16b7770d1ae",
  "detail-type": "SUBSCRIPTION_RENEW",
  "source": "no.mediaconnect.connect",
  "account": "408193426112",
  "time": "2022-01-19T13:07:17Z",
  "region": "eu-north-1",
  "resources": [],
  "detail": {
    "schema": "CNxx",
    "customer": 12345,
    "product": "PROD1",
    "periodEnd": 1610665200000
  }
}

Subscription stop reset event

Event type

SUBSCRIPTION_STOP_RESET

Description

This event is generated by Connect when a stopped subscription product is restarted on a customer. This means that the specified customer has been reactivated on the given product.

Event specific fields

FieldTypeDescriptionNullable
schemaStringIdentifier of Connect schema that generated the event.No
customerIntegerConnect customer number related to the event.No
productStringProduct code of the subscription that has started.No
periodEndIntegerEpoch timestamp in milliseconds for end of current subscription period.Yes

Example payload

{
  "version": "0",
  "id": "734035b3-b2e0-115f-c3e0-3355d5dc438a",
  "detail-type": "SUBSCRIPTION_STOP_RESET",
  "source": "no.mediaconnect.connect",
  "account": "408193426112",
  "time": "2022-07-07T13:24:29Z",
  "region": "eu-north-1",
  "resources": [],
  "detail": {
    "schema": "CNxx",
    "customer": 12345,
    "product": "PROD1",
    "periodEnd": 1610665200000
  }
}

Order verification event

Event type

ORDER_VERIFICATION

Description

This event is generated when the verification process of an order is initiated.

Event specific fields

FieldTypeDescriptionNullable
schemaStringIdentifier of Connect schema that generated the event.No
receiversInteger arrayList of Connect customer numbers that are receivers in the order. This will be empty if payer is the same as the receiver.Yes
payerIntegerConnect customer number of the payer of the order.Yes
connectOrderNumberIntegerConnect order number.No
cidOrderNumberIntegerConnectID order number.Yes
statusStringStatus code for the order. See description here.Yes

Example payload

{
  "version": "0",
  "id": "44e4dfe0-fb98-536d-0d55-a16b7770d1ae",
  "detail-type": "ORDER_VERIFICATION",
  "source": "no.mediaconnect.connect",
  "account": "408193426112",
  "time": "2022-01-19T13:07:17Z",
  "region": "eu-north-1",
  "resources": [],
  "detail": {
    "schema": "CNxx",
    "receivers": [
      23456,
      34567
    ],
    "payer": 12345,
    "connectOrderNumber": 54321,
    "cidOrderNumber": 24680,
    "status": "B"
  }
}

Order processed event

Event type

ORDER_PROCESSED

Description

This event is generated when the verification process of an order is processed.

Event specific fields

FieldTypeDescriptionNullable
schemaStringIdentifier of Connect schema that generated the event.No
receiversInteger arrayList of Connect customer numbers that are receivers in the order. This will be empty if payer is the same as the receiver.No
payerIntegerConnect customer number of the payer of the order.No
connectOrderNumberIntegerConnect order number.No
cidOrderNumberIntegerConnectID order number.No
statusStringStatus code for the order. See description here.No

Example payload

{
  "version": "0",
  "id": "44e4dfe0-fb98-536d-0d55-a16b7770d1ae",
  "detail-type": "ORDER_PROCESSED",
  "source": "no.mediaconnect.connect",
  "account": "408193426112",
  "time": "2022-01-19T13:07:17Z",
  "region": "eu-north-1",
  "resources": [],
  "detail": {
    "schema": "CNxx",
    "receivers": [
      23456,
      34567
    ],
    "payer": 12345,
    "connectOrderNumber": 54321,
    "cidOrderNumber": 24680,
    "status": "B"
  }
}

Customer data changed

Event type

CUSTOMER_DATA_CHANGED

Description

The event will be generated and sent to EventBrigde if customer data has been changed. This means the event will be trigged by a change of name, address, email address, or phone numbers.

Event specific fields

FieldTypeDescriptionNullable
schemaStringIdentifier of Connect schema that generated the event.No
customerIntegerCustomer numberNo
nameobjectObject of NameNo
firstNameStringCustomer first nameYes
middleNameStringCustomer middle nameYes
lastNameStringCustomer last nameYes
companyNameStringName of the companyYes
departmentNameStringdepartment nameYes
phoneNumbersobject arrayObject of phone numberNo
phoneNumberStringThe phone number, following standard E.164Yes
phoneNumberTypeStringPhone number type: Company, Personal, FaxYes
emailsString arrayEmail addressNo
addressStringObject of addressNo
addressTypeStringThere are three adresseType: currentAddress, historicalAddress, futureAddressNo
streetAddressStringThe street for this addressYes
streetNumberStringThe street number for this addressYes
entranceStringThe entrance for this addressYes
floorStringThe floor for this addressYes
postalCodeStringThe postal code for this addressYes
postalPlaceStringThe postal place for this addressYes
postalAddressStringThe postal address for this addressYes
countryCodeStringThe country code for this address - ISO 3166 - alpha-2Yes

Example payload

{
  "version": "0",
  "id": "26bbc183-2c4a-00b1-0092-5d46653bef3f",
  "detail-type": "CUSTOMER_DATA_CHANGED",
  "source": "no.mediaconnect.connect",
  "account": "408193426112",
  "time": "2022-03-09T13:23:34Z",
  "region": "eu-north-1",
  "resources": [],
  "detail": {
    "schema": "CNDEV",
    "customer": 3,
    "name": {
      "firstName": "John",
      "middleName": "Middle",
      "lastName": "Doe",
      "companyName": "Mediaconnect",
      "departmentName": "Devops"
    },
    "phoneNumbers": [
      {
        "phoneNumber": "+4711122333",
        "phoneNumberType": "personal"
      },
      {
        "phoneNumber": "+4711133444",
        "phoneNumberType": "company"
      }
    ],
    "emails": [
      "email1@mediaconnnect.no",
      "email2@mediaconnect.no"
    ],
    "address": {
      "addressType": "currentAddress",
      "streetAddress": "Storgt.",
      "streetNumber": 56,
      "entrance": "A",
      "floor": 2,
      "postalCode": "2016",
      "postalPlace": "Oslo",
      "postalAddress": "Pb 265 Økern",
      "countryCode": "NO"
    }
  }
}

Order status codes

The following status codes are used on Connect orders.

CodeDescription
APreliminary order (not yet confirmed by the merchant service provider).
BConfirmed order, initial status for most orders.
COrder updated in client schema.
DAn error occurred on this order.
GDuplicate order.
HWrong coupon code or number.
IError creating a name and/or address.
JError creating recurring product.
KThis order should not be processed.
LThis order needs to be processed manually.
MThis order has been processed manually.
NError due to active gift subscription.
OError due to active gift subscription, email sent.
PError when handling prepaid/single credit card.