CustomerEvent
CustomerEvent schema
Properties
AggregateId(string, format: {FulfillmentSystemId}-{FulfillmentSystemCustomerId}-{ShippingOrderId})Unique ID for shipping order within Integration Broker.CorrelationId(string)Unique ID for SOB-external event trigger.AggregateType(string)Type of event schema.EventActionUser(['string', 'null'])Username of user who triggered event.EventDateTimeUtc(string)UTC based datetime of when event was triggered.EventName(string)Name of triggered event.-
EventNameValuePairs(['array', 'null'])- Items (object)
-
EventPublisherApp(string)Name of source application that published event. EventSchemaVersion(string)Version of event schema being used.EventSource(string)Name of system where event was triggered.-
Customer(object)Customer properties for CustomerEvent.DefaultWarehouseId(['string', 'null'])Default warehouse ID.Id(string, required)Customer ID.XmlSenderId(['string', 'null'])XML sender ID.BillToCodeRequiredOnOrder(boolean, required)Whether bill-to code is required on order.-
BillingEntities(['array', 'null'])Billing entities.-
Items (object)
Id(string, required)Billing entity ID.XmlSenderId(['string', 'null'])XML sender ID.-
Addresses(['array', 'null'])Billing entity addresses.-
Items (object)
XmlSenderId(['string', 'null'])XML sender ID.Address1(string, required)Address line 1.Address2(['string', 'null'])Address line 2.Address3(['string', 'null'])Address line 3.City(string, required)City.Code(string, required)Address code.Company(['string', 'null'])Company name.Country(string, required)Country.EmailAddress(['string', 'null'])Email address.FaxNumber(['string', 'null'])Fax number.IsBillToDefault(boolean)Whether this is the default bill-to address.IsShipToDefault(boolean)Whether this is the default ship-to address.Name(string, required)Address name.PhoneNumber(['string', 'null'])Phone number.PostalCode(string, required)Postal code.StateProvince(string, required)State or province.
-
-
IsDefaultForCustomer(boolean, required)Whether this is the default billing entity for the customer.
-
-
BrokerScopes(['array', 'null'])Broker scopes.- Items (string)
-
ContactAddress(['object', 'null'])Contact address.Address1(string, required)Address line 1.Address2(['string', 'null'])Address line 2.Address3(['string', 'null'])Address line 3.City(string, required)City.Company(['string', 'null'])Company.Country(string, required)Country.FaxNumber(['string', 'null'])Fax number.Name(['string', 'null'])Name.PhoneNumber(['string', 'null'])Phone number.PostalCode(string, required)Postal code.StateProvince(string, required)State or province.
-
ContactEmailAddress(['string', 'null'])Contact email address. DoValidateOrderPrice(boolean, required)Whether to validate order price.-
EmailNotificationSubscriptions(['array', 'null'])Email notification subscriptions.-
Items (object)
EmailNotificationTemplateId(string, required)Email notification template ID.-
EmailAddresses(array, required)Email addresses.- Items (string)
-
-
InvoiceEmailAddress(['string', 'null'])Invoice email address. Name(string, required)Customer name.OfferRevisionDelimiter(['string', 'null'])Offer revision delimiter.-
Parent(['object', 'null'])Parent customer.Id(string)Parent customer ID.Name(string)Parent customer name.
-
Partner(['string', 'null'])Partner. PaymentEmailAddress(['string', 'null'])Payment email address.PhoneNumber(['string', 'null'])Phone number.ProductionFileLocation(['string', 'null'])Production file location.SalesRep(['string', 'null'])Sales representative.-
ShipMethodMappings(['array', 'null'])Ship method mappings.-
Items (object)
RatesProviderShipMethodId(string, required)Rates provider ship method ID.SourceSystemShipMethodId(string, required)Source system ship method ID.-
FulfillmentSystemShipMethods(array, required)Fulfillment system ship methods.-
Items (object)
FulfillmentSystemId(integer, required)Fulfillment system ID.FulfillmentSystemShipMethodId(string, required)Fulfillment system ship method ID.
-
-
TrackingUrl(['string', 'null'])Tracking URL.
-
-
SourceSystems(['array', 'null'])Source systems.-
Items (object)
Id(integer, required)Source system ID.SourceSystemCustomerId(string)This is an automatically generated field added by middleware. It is considered read-only.Name(string)Source system name.
-
-
Subsidiary(['string', 'null'])Subsidiary. Website(['string', 'null'])Website.
-
EventName(string)Name of triggered event. Must be one of:["Customer Created", "Customer Updated"].
Examples
{
"AggregateId": "6-mzvanhki-4-C-5606-0046-03",
"CorrelationId": "282so37c-sac5-77s3-1ow7-74u10g0386cq",
"AggregateType": "Customer",
"Customer": {
"Id": "customer-123",
"BillingEntities": [
{
"Id": "billing-1",
"XmlSenderId": "xml-sender-1",
"IsDefaultForCustomer": true
}
],
"Parent": {
"Id": "parent-456",
"Name": "Parent Customer"
},
"ShipMethodMappings": null,
"SourceSystems": [
{
"Id": 1,
"SourceSystemCustomerId": "vc-123",
"Name": "VeraCore"
}
]
},
"EventActionUser": null,
"EventDateTimeUtc": "2024-11-22T22:16:00.263",
"EventName": "Customer Created",
"EventNameValuePairs": null,
"EventPublisherApp": "Customer Event Publisher",
"EventSchemaVersion": "1.0",
"EventSource": "CustomerBroker"
}
Quicktype Command
quicktype \
--framework SystemTextJson \
--lang cs \
--number-type double \
--src-lang schema \
--no-check-required \
--density dense \
--features complete \
--namespace OtpSchema.Event.Customer.CustomerEvent \
--src .working/build/internal/json-schema-for-cs/CustomerEvent.json -o .working/build/internal/csharp/OtpSchema/Event/Customer/CustomerEvent.cs
// <auto-generated />
//
// To parse this JSON data, add NuGet 'System.Text.Json' then do:
//
// using OtpSchema.Event.Customer.CustomerEvent;
//
// var customerEvent = CustomerEvent.FromJson(jsonString);
#nullable enable
#pragma warning disable CS8618
#pragma warning disable CS8601
#pragma warning disable CS8603
namespace OtpSchema.Event.Customer.CustomerEvent
{
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Globalization;
using J = System.Text.Json.Serialization.JsonPropertyNameAttribute;
using N = System.Text.Json.Serialization.JsonIgnoreCondition;
/// <summary>CustomerEvent schema; ; Details for Shipping Order JSON schema</summary>
public partial class CustomerEvent
{
[J("AggregateId")] public string AggregateId { get; set; } // Unique ID for shipping order within Integration Broker
[J("AggregateType")] public string AggregateType { get; set; } // Type of event schema
[J("CorrelationId")] public string CorrelationId { get; set; } // Unique ID for SOB-external event trigger
[J("EventActionUser")] public string EventActionUser { get; set; } // Username of user who triggered event
[J("EventDateTimeUtc")] public string EventDateTimeUtc { get; set; } // UTC based datetime of when event was triggered
[J("EventName")] public AggregateId EventName { get; set; } // Name of triggered event
[J("EventNameValuePairs")] public Dictionary<string, object>[] EventNameValuePairs { get; set; }
[J("EventPublisherApp")] public string EventPublisherApp { get; set; } // Name of source application that published event
[J("EventSchemaVersion")] public string EventSchemaVersion { get; set; } // Version of event schema being used
[J("EventSource")] public string EventSource { get; set; } // Name of system where event was triggered
[J("Customer")] public Customer Customer { get; set; } // Customer properties for CustomerEvent
}
/// <summary>Customer properties for CustomerEvent</summary>
public partial class Customer
{
[J("BillingEntities")] public BillingEntity[] BillingEntities { get; set; } // Billing entities
[J("BillToCodeRequiredOnOrder")] public bool BillToCodeRequiredOnOrder { get; set; } // Whether bill-to code is required on order
[J("BrokerScopes")] public string[] BrokerScopes { get; set; } // Broker scopes
[J("ContactAddress")] public ContactAddress ContactAddress { get; set; } // Contact address
[J("ContactEmailAddress")] public string ContactEmailAddress { get; set; } // Contact email address
[J("DefaultWarehouseId")] public string DefaultWarehouseId { get; set; } // Default warehouse ID
[J("DoValidateOrderPrice")] public bool DoValidateOrderPrice { get; set; } // Whether to validate order price
[J("EmailNotificationSubscriptions")] public EmailNotificationSubscription[] EmailNotificationSubscriptions { get; set; } // Email notification subscriptions
[J("Id")] public string Id { get; set; } // Customer ID
[J("InvoiceEmailAddress")] public string InvoiceEmailAddress { get; set; } // Invoice email address
[J("Name")] public string Name { get; set; } // Customer name
[J("OfferRevisionDelimiter")] public string OfferRevisionDelimiter { get; set; } // Offer revision delimiter
[J("Parent")] public Parent Parent { get; set; } // Parent customer
[J("Partner")] public string Partner { get; set; } // Partner
[J("PaymentEmailAddress")] public string PaymentEmailAddress { get; set; } // Payment email address
[J("PhoneNumber")] public string PhoneNumber { get; set; } // Phone number
[J("ProductionFileLocation")] public string ProductionFileLocation { get; set; } // Production file location
[J("SalesRep")] public string SalesRep { get; set; } // Sales representative
[J("ShipMethodMappings")] public ShipMethodMapping[] ShipMethodMappings { get; set; } // Ship method mappings
[J("SourceSystems")] public SourceSystem[] SourceSystems { get; set; } // Source systems
[J("Subsidiary")] public string Subsidiary { get; set; } // Subsidiary
[J("Website")] public string Website { get; set; } // Website
[J("XmlSenderId")] public string XmlSenderId { get; set; } // XML sender ID
}
public partial class BillingEntity
{
[J("Addresses")] public Address[] Addresses { get; set; } // Billing entity addresses
[J("Id")] public string Id { get; set; } // Billing entity ID
[J("IsDefaultForCustomer")] public bool IsDefaultForCustomer { get; set; } // Whether this is the default billing entity for the customer
[J("XmlSenderId")] public string XmlSenderId { get; set; } // XML sender ID
}
public partial class Address
{
[J("Address1")] public string Address1 { get; set; } // Address line 1
[J("Address2")] public string Address2 { get; set; } // Address line 2
[J("Address3")] public string Address3 { get; set; } // Address line 3
[J("City")] public string City { get; set; } // City
[J("Code")] public string Code { get; set; } // Address code
[J("Company")] public string Company { get; set; } // Company name
[J("Country")] public string Country { get; set; } // Country
[J("EmailAddress")] public string EmailAddress { get; set; } // Email address
[J("FaxNumber")] public string FaxNumber { get; set; } // Fax number
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("IsBillToDefault")] public bool? IsBillToDefault { get; set; } // Whether this is the default bill-to address
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("IsShipToDefault")] public bool? IsShipToDefault { get; set; } // Whether this is the default ship-to address
[J("Name")] public string Name { get; set; } // Address name
[J("PhoneNumber")] public string PhoneNumber { get; set; } // Phone number
[J("PostalCode")] public string PostalCode { get; set; } // Postal code
[J("StateProvince")] public string StateProvince { get; set; } // State or province
[J("XmlSenderId")] public string XmlSenderId { get; set; } // XML sender ID
}
public partial class ContactAddress
{
[J("Address1")] public string Address1 { get; set; } // Address line 1
[J("Address2")] public string Address2 { get; set; } // Address line 2
[J("Address3")] public string Address3 { get; set; } // Address line 3
[J("City")] public string City { get; set; } // City
[J("Company")] public string Company { get; set; } // Company
[J("Country")] public string Country { get; set; } // Country
[J("FaxNumber")] public string FaxNumber { get; set; } // Fax number
[J("Name")] public string Name { get; set; } // Name
[J("PhoneNumber")] public string PhoneNumber { get; set; } // Phone number
[J("PostalCode")] public string PostalCode { get; set; } // Postal code
[J("StateProvince")] public string StateProvince { get; set; } // State or province
}
public partial class EmailNotificationSubscription
{
[J("EmailAddresses")] public string[] EmailAddresses { get; set; } // Email addresses
[J("EmailNotificationTemplateId")] public string EmailNotificationTemplateId { get; set; } // Email notification template ID
}
public partial class Parent
{
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("Id")] public string Id { get; set; } // Parent customer ID
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("Name")] public string Name { get; set; } // Parent customer name
}
public partial class ShipMethodMapping
{
[J("FulfillmentSystemShipMethods")] public FulfillmentSystemShipMethod[] FulfillmentSystemShipMethods { get; set; } // Fulfillment system ship methods
[J("RatesProviderShipMethodId")] public string RatesProviderShipMethodId { get; set; } // Rates provider ship method ID
[J("SourceSystemShipMethodId")] public string SourceSystemShipMethodId { get; set; } // Source system ship method ID
[J("TrackingUrl")] public string TrackingUrl { get; set; } // Tracking URL
}
public partial class FulfillmentSystemShipMethod
{
[J("FulfillmentSystemId")] public long FulfillmentSystemId { get; set; } // Fulfillment system ID
[J("FulfillmentSystemShipMethodId")] public string FulfillmentSystemShipMethodId { get; set; } // Fulfillment system ship method ID
}
public partial class SourceSystem
{
[J("Id")] public long Id { get; set; } // Source system ID
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("Name")] public string Name { get; set; } // Source system name
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("SourceSystemCustomerId")] public string SourceSystemCustomerId { get; set; } // This is an automatically generated field added by middleware. It is considered read-only
}
/// <summary>Name of triggered event</summary>
public enum AggregateId { CustomerCreated, CustomerUpdated };
public partial class CustomerEvent
{
public static CustomerEvent FromJson(string json) => JsonSerializer.Deserialize<CustomerEvent>(json, OtpSchema.Event.Customer.CustomerEvent.Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this CustomerEvent self) => JsonSerializer.Serialize(self, OtpSchema.Event.Customer.CustomerEvent.Converter.Settings);
}
internal static class Converter
{
public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General)
{
Converters =
{
AggregateIdConverter.Singleton,
new DateOnlyConverter(),
new TimeOnlyConverter(),
IsoDateTimeOffsetConverter.Singleton
},
};
}
internal class AggregateIdConverter : JsonConverter<AggregateId>
{
public override bool CanConvert(Type t) => t == typeof(AggregateId);
public override AggregateId Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
switch (value)
{
case "Customer Created":
return AggregateId.CustomerCreated;
case "Customer Updated":
return AggregateId.CustomerUpdated;
}
throw new Exception("Cannot unmarshal type AggregateId");
}
public override void Write(Utf8JsonWriter writer, AggregateId value, JsonSerializerOptions options)
{
switch (value)
{
case AggregateId.CustomerCreated:
JsonSerializer.Serialize(writer, "Customer Created", options);
return;
case AggregateId.CustomerUpdated:
JsonSerializer.Serialize(writer, "Customer Updated", options);
return;
}
throw new Exception("Cannot marshal type AggregateId");
}
public static readonly AggregateIdConverter Singleton = new AggregateIdConverter();
}
public class DateOnlyConverter : JsonConverter<DateOnly>
{
private readonly string serializationFormat;
public DateOnlyConverter() : this(null) { }
public DateOnlyConverter(string? serializationFormat)
{
this.serializationFormat = serializationFormat ?? "yyyy-MM-dd";
}
public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
return DateOnly.Parse(value!);
}
public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
=> writer.WriteStringValue(value.ToString(serializationFormat));
}
public class TimeOnlyConverter : JsonConverter<TimeOnly>
{
private readonly string serializationFormat;
public TimeOnlyConverter() : this(null) { }
public TimeOnlyConverter(string? serializationFormat)
{
this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff";
}
public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
return TimeOnly.Parse(value!);
}
public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options)
=> writer.WriteStringValue(value.ToString(serializationFormat));
}
internal class IsoDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
{
public override bool CanConvert(Type t) => t == typeof(DateTimeOffset);
private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;
private string? _dateTimeFormat;
private CultureInfo? _culture;
public DateTimeStyles DateTimeStyles
{
get => _dateTimeStyles;
set => _dateTimeStyles = value;
}
public string? DateTimeFormat
{
get => _dateTimeFormat ?? string.Empty;
set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value;
}
public CultureInfo Culture
{
get => _culture ?? CultureInfo.CurrentCulture;
set => _culture = value;
}
public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
{
string text;
if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal
|| (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
{
value = value.ToUniversalTime();
}
text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture);
writer.WriteStringValue(text);
}
public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
string? dateText = reader.GetString();
if (string.IsNullOrEmpty(dateText) == false)
{
if (!string.IsNullOrEmpty(_dateTimeFormat))
{
return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles);
}
else
{
return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles);
}
}
else
{
return default(DateTimeOffset);
}
}
public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter();
}
}
#pragma warning restore CS8618
#pragma warning restore CS8601
#pragma warning restore CS8603
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "CustomerEvent.json",
"description": "CustomerEvent schema",
"type": "object",
"allOf": [
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "EventBase.json",
"description": "Details for Shipping Order JSON schema",
"type": "object",
"properties": {
"AggregateId": {
"description": "Unique ID for shipping order within Integration Broker",
"type": "string",
"format": "{FulfillmentSystemId}-{FulfillmentSystemCustomerId}-{ShippingOrderId}"
},
"CorrelationId": {"description": "Unique ID for SOB-external event trigger", "type": "string"},
"AggregateType": {"description": "Type of event schema", "type": "string"},
"EventActionUser": {
"description": "Username of user who triggered event",
"type": ["string", "null"],
"veraCoreSource": "SHPACK_UserName in warehouse DB. SHPACK in the OMS contains a SeqId for the warehouse table."
},
"EventDateTimeUtc": {
"description": "UTC based datetime of when event was triggered",
"type": "string"
},
"EventName": {"description": "Name of triggered event", "type": "string"},
"EventNameValuePairs": { "type": ["array", "null"], "items": {"type": "object"} },
"EventPublisherApp": {
"description": "Name of source application that published event",
"type": "string"
},
"EventSchemaVersion": {"description": "Version of event schema being used", "type": "string"},
"EventSource": {"description": "Name of system where event was triggered", "type": "string"}
},
"required": [
"AggregateId", "AggregateType", "CorrelationId", "EventDateTimeUtc", "EventName",
"EventPublisherApp", "EventSchemaVersion", "EventSource"
]
},
{
"type": "object",
"properties": {
"Customer": {
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "Customer.json",
"description": "Customer properties for CustomerEvent",
"type": "object",
"properties": {
"DefaultWarehouseId": { "description": "Default warehouse ID", "type": ["string", "null"] },
"Id": {"description": "Customer ID", "type": "string"},
"XmlSenderId": { "description": "XML sender ID", "type": ["string", "null"] },
"BillToCodeRequiredOnOrder": {"description": "Whether bill-to code is required on order", "type": "boolean"},
"BillingEntities": {
"description": "Billing entities",
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"Id": {"description": "Billing entity ID", "type": "string"},
"XmlSenderId": { "description": "XML sender ID", "type": ["string", "null"] },
"Addresses": {
"description": "Billing entity addresses",
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"XmlSenderId": { "description": "XML sender ID", "type": ["string", "null"] },
"Address1": {"description": "Address line 1", "type": "string"},
"Address2": { "description": "Address line 2", "type": ["string", "null"] },
"Address3": { "description": "Address line 3", "type": ["string", "null"] },
"City": {"description": "City", "type": "string"},
"Code": {"description": "Address code", "type": "string"},
"Company": { "description": "Company name", "type": ["string", "null"] },
"Country": {"description": "Country", "type": "string"},
"EmailAddress": { "description": "Email address", "type": ["string", "null"] },
"FaxNumber": { "description": "Fax number", "type": ["string", "null"] },
"IsBillToDefault": {
"description": "Whether this is the default bill-to address",
"type": "boolean"
},
"IsShipToDefault": {
"description": "Whether this is the default ship-to address",
"type": "boolean"
},
"Name": {"description": "Address name", "type": "string"},
"PhoneNumber": { "description": "Phone number", "type": ["string", "null"] },
"PostalCode": {"description": "Postal code", "type": "string"},
"StateProvince": {"description": "State or province", "type": "string"}
},
"required": ["Name", "Address1", "City", "Country", "StateProvince", "PostalCode", "Code"]
}
},
"IsDefaultForCustomer": {
"description": "Whether this is the default billing entity for the customer",
"type": "boolean"
}
},
"required": ["Id", "IsDefaultForCustomer"]
}
},
"BrokerScopes": {
"description": "Broker scopes",
"type": ["array", "null"],
"items": {"type": "string"}
},
"ContactAddress": {
"description": "Contact address",
"type": ["object", "null"],
"properties": {
"Address1" : { "description": "Address line 1" , "type": "string" },
"Address2" : { "description": "Address line 2" , "type": ["string", "null"] },
"Address3" : { "description": "Address line 3" , "type": ["string", "null"] },
"City" : { "description": "City" , "type": "string" },
"Company" : { "description": "Company" , "type": ["string", "null"] },
"Country" : { "description": "Country" , "type": "string" },
"FaxNumber" : { "description": "Fax number" , "type": ["string", "null"] },
"Name" : { "description": "Name" , "type": ["string", "null"] },
"PhoneNumber" : { "description": "Phone number" , "type": ["string", "null"] },
"PostalCode" : { "description": "Postal code" , "type": "string" },
"StateProvince": { "description": "State or province", "type": "string" }
},
"required": ["Address1", "City", "Country", "PostalCode", "StateProvince"]
},
"ContactEmailAddress": { "description": "Contact email address", "type": ["string", "null"] },
"DoValidateOrderPrice": {"description": "Whether to validate order price", "type": "boolean"},
"EmailNotificationSubscriptions": {
"description": "Email notification subscriptions",
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"EmailNotificationTemplateId": {"description": "Email notification template ID", "type": "string"},
"EmailAddresses": {
"description": "Email addresses",
"type": "array",
"items": {"type": "string"}
}
},
"required": ["EmailNotificationTemplateId", "EmailAddresses"]
}
},
"InvoiceEmailAddress": { "description": "Invoice email address", "type": ["string", "null"] },
"Name": {"description": "Customer name", "type": "string"},
"OfferRevisionDelimiter": { "description": "Offer revision delimiter", "type": ["string", "null"] },
"Parent": {
"description": "Parent customer",
"type": ["object", "null"],
"properties": {
"Id" : { "description": "Parent customer ID" , "type": "string" },
"Name": { "description": "Parent customer name", "type": "string" }
}
},
"Partner": { "description": "Partner", "type": ["string", "null"] },
"PaymentEmailAddress": { "description": "Payment email address", "type": ["string", "null"] },
"PhoneNumber": { "description": "Phone number", "type": ["string", "null"] },
"ProductionFileLocation": { "description": "Production file location", "type": ["string", "null"] },
"SalesRep": { "description": "Sales representative", "type": ["string", "null"] },
"ShipMethodMappings": {
"description": "Ship method mappings",
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"RatesProviderShipMethodId": {"description": "Rates provider ship method ID", "type": "string"},
"SourceSystemShipMethodId": {"description": "Source system ship method ID", "type": "string"},
"FulfillmentSystemShipMethods": {
"description": "Fulfillment system ship methods",
"type": "array",
"items": {
"type": "object",
"properties": {
"FulfillmentSystemId" : { "description": "Fulfillment system ID" , "type": "integer" },
"FulfillmentSystemShipMethodId": { "description": "Fulfillment system ship method ID", "type": "string" }
},
"required": ["FulfillmentSystemId", "FulfillmentSystemShipMethodId"]
}
},
"TrackingUrl": { "description": "Tracking URL", "type": ["string", "null"] }
},
"required": [
"SourceSystemShipMethodId", "RatesProviderShipMethodId",
"FulfillmentSystemShipMethods"
]
}
},
"SourceSystems": {
"description": "Source systems",
"type": ["array", "null"],
"items": {
"type": "object",
"properties": {
"Id": {"description": "Source system ID", "type": "integer"},
"SourceSystemCustomerId": {
"description": "This is an automatically generated field added by middleware. It is considered read-only",
"type": "string",
"readonly": true
},
"Name": {"description": "Source system name", "type": "string"}
},
"required": ["Id"]
}
},
"Subsidiary": { "description": "Subsidiary", "type": ["string", "null"] },
"Website": { "description": "Website", "type": ["string", "null"] }
},
"required": ["Id", "Name", "BillToCodeRequiredOnOrder", "DoValidateOrderPrice"]
}
},
"required": ["Customer"]
},
{
"type": "object",
"properties": {
"EventName": {
"description": "Name of triggered event",
"type": "string",
"enum": ["Customer Created", "Customer Updated"]
}
}
}
],
"examples": [
{
"AggregateId": "6-mzvanhki-4-C-5606-0046-03",
"CorrelationId": "282so37c-sac5-77s3-1ow7-74u10g0386cq",
"AggregateType": "Customer",
"Customer": {
"Id": "customer-123",
"BillingEntities": [
{"Id": "billing-1", "XmlSenderId": "xml-sender-1", "IsDefaultForCustomer": true}
],
"Parent": {"Id": "parent-456", "Name": "Parent Customer"},
"ShipMethodMappings": null,
"SourceSystems": [ {"Id": 1, "SourceSystemCustomerId": "vc-123", "Name": "VeraCore"} ]
},
"EventActionUser": null,
"EventDateTimeUtc": "2024-11-22T22:16:00.263",
"EventName": "Customer Created",
"EventNameValuePairs": null,
"EventPublisherApp": "Customer Event Publisher",
"EventSchemaVersion": "1.0",
"EventSource": "CustomerBroker"
}
]
}