Namespace DirectScale.Disco.Extension.EventModels
Classes
CreateAssociateEvent
ID: "2" This event occurs when you create an Associate.
CreateInventoryItemEvent
ID: "CreateInventoryItemEvent"
This event occurs whenever you create a new inventory item.
CreateOrderEvent
ID: "CreateOrderEvent"
This event occurs when a customer creates a new order within the DirectScale Platform.
Orders created but not finalized are recorded in the ORD_Orders table but are "Void"; you can not view them within Corporate Admin.
Orders can be created through Web Office, Corporate Admin, Extension API or Public API
Create Customer Order API
Import External API
{
"OrderNumber":1,
"CustomerId":2,
"OrderDateUtc":"2021-10-12T18:07:26.557768Z",
"OrderStatus":"Pending processing",
"OrderType":"Standard",
"EventDateUtc":"2021-10-12T18:07:26.557768Z",
"EventCategory":"OrderEvents",
"EventType":"CreateOrderEvent",
}
CreateOrderPaymentEvent
ID: "CreateOrderPaymentEvent"
This event occurs when an order records a new payment.
A new payment creation often affects an order’s status. Order payments are created through the normal checkout process in the Web Office and Corporate Admin or the Insert Payments Public API endpoint.
CreateSubscriptionEvent
ID: "4" This event occurs when an Associate creates a new Subscription
DailyEvent
ID: "DailyEvent" This event occurs Daily when the Daily Run process is triggered.
DeleteInventoryItemEvent
ID: "DeleteInventoryItemEvent"
This event occurs whenever you delete an inventory item.
Inventory items may be deleted using the Delete Item Public API endpoint, or from the Inventory page in Corporate Admin.
Deleting An Inventory Item
Delete Item API
{
"ItemId":4,
"Sku":"TST_EVT",
"TrackStock":true,
"HasOptions":true,
"EventDateUtc":"2021-10-12T18:01:39.5127343Z",
"EventCategory":"OrderEvents",
"EventType":"DeleteInventoryItemEvent",
}
EnrollmentEvent
ID: "0" This event occurs any time a new customer or Associate is enrolled.
EventBase
A class with properties shared between All Events
FinalizeOrderEvent
ID: "FinalizeOrderEvent"
This event occurs when an order has completed the processing phase regardless of its source.
This event can fire multiple times a given order under certain circumstances.
Any time a customer attempts an order's payment, that order runs through the finalization process.
A few of the scenarios where this is likely to occur include:
When an order's initial payment is pending or declined, another payment attempt must be made to pay for the order entirely.
- When an order has no initial payment, and a payment attempt must be made to pay for the order entirely. This happens when "No Payment" is selected as the initial payment method within Corporate Admin.
- When the Fraud Prevention module is enabled and an order's payment is "Under Review". Once a fraud decision is made, the payment will be processed to complete the order.
- When the Fraud Prevention module is enabled, and an order's payment is "Declined" for fraud. If the decline is erroneous, the payment will be processed in an attempt to complete the order.
If payment was successful, and the order is paid in full, the finalization process may trigger other processes, which include:
- Reserving item/inventory stock
- Submitting order shipping information to configured Third-Party Logistics Providers
- Recalculating the order's Associate's commissions
- Subscription setup/renewal
Finalization events only happen once for Imported Orders and occur immediately after their creation event.
{
"OrderNumber":1,
"CustomerId":2,
"OrderDateUtc":"2021-10-12T18:07:26.497Z",
"OrderStatus":"Paid",
"OrderType":"Standard",
"EventDateUtc":"2021-10-12T18:07:27.8181496Z",
"EventCategory":"OrderEvents",
"EventType":"FinalizeOrderEvent",
}
InventoryItemEventBase
A class with properties shared between Inventory Item Events
OrderEvent
ID: "1"
Use the following events instead:
OrderEventBase
A class with properties shared between Order Events
OrderPackageEventBase
A class with properties shared between Order Package Events
OrderPaymentEventBase
A class with properties shared between Order Payment Events
OrderPaymentStatusEventBase
A class with properties shared between Order Payment Status Events
RefundOrderPaymentEvent
ID: "RefundOrderPaymentEvent"
This event event occurs when a payment is entirely (or partially) refunded.
StockLevelEvent
ID: "StockLevelEvent"
This event occurs when an inventory item stock status changes.
SubmitOrderPackageEvent
ID: "SubmitOrderPackageEvent"
This event occurs whenever a package is ready to be submitted to logistics providers for fulfillment.
- There is no trigger event for package creation. This is by design because package creation is part of the order submission process—often created before the order is fully finalized. For this purpose, we wait until the order is finalized to send out package notifications.
- This event is also triggered if a package is split. The event will not trigger for the parent package but any packages created due to the split.
- This event may trigger before the package is submitted to a logistics provider. The package synchronization process occurs once every 90 minutes unless triggered manually. Because this event triggers directly after an order is finalized and runs independently of the package synchronization process, the timespan between when the event was triggered and when the package synchronization process submits the package for fulfillment may then be as long as 90 minutes.
You may submit a package during the normal order finalization process within the Web Office and Corporate Admin and the Create Customer Order Public API endpoint.
The split package process is available through the Split Package endpoint. There is currently no way to split a package via Corporate Admin.
Create Customer Order API
Split Package API
{
"OrderNumber":2,
"PackageId":1,
"PackageStatus":"Submitted",
"WarehouseId":1,
"ShipMethodId":1,
"TrackingNumber":null,
"Carrier":"",
"ShipByDateUtc":"2021-10-12T18:21:31Z",
"ShippedDateUtc":null,
"EventDateUtc":"2021-10-12T18:21:36.1218815Z",
"EventCategory":"OrderEvents",
"EventType":"SubmitOrderPackageEvent",
}
UpdateAssociateEvent
ID: "3" This event occurs when you update an Associate's account.
UpdateInventoryItemEvent
ID: "UpdateInventoryItemEvent"
This event occurs whenever you update an inventory item.
{
"ItemId":4,
"Sku":"TST_EVT",
"TrackStock":true,
"HasOptions":true,
"EventDateUtc":"2021-10-12T18:00:58.0119209Z",
"EventCategory":"OrderEvents",
"EventType":"UpdateInventoryItemEvent",
"CustomData":{
},
"UnknownDataItems":{
}
}
UpdateOrderEvent
ID: "UpdateOrderEvent"
This event occurs whenever you update an order’s metadata using the Edit Order page in Corporate Admin.
- Commission Date
- PV
- QV
- Bonus
- Party ID
- Local Invoice Number
- Notes
- Order Custom Fields
Thus, the Order Updated Event is not necessarily associated with status changes.
There is currently no way to edit an order through DirectScale’s API.
Editing an order in Corp Admin
{
"OrderNumber":1,
"CustomerId":2,
"OrderDateUtc":"2021-10-12T18:07:26.497Z",
"OrderStatus":"Paid",
"OrderType":"Standard",
"EventDateUtc":"2021-10-12T18:11:07.3230547Z",
"EventCategory":"OrderEvents",
"EventType":"UpdateOrderEvent",
}
UpdateOrderPackageEvent
ID: "UpdateOrderPackageEvent"
UpdateOrderPackageStatusEvent
ID: "UpdateOrderPackageStatusEvent"
This event occurs whenever an order package updates.
Package updates are processed through any logistics providers integrated with DirectScale and through the Update Package Status and Update Package Status Batch Public API endpoints. This may also occur within Corporate Admin when an order package is manually marked “Shipped”.
IMPORTANT: If you've enabled the Enable Legacy FTP Package Update Behavior setting, package updates submitted via FTP server will not trigger the update event.
UpdateOrderPaymentStatusEvent
ID: "UpdateOrderPaymentStatusEvent"
UpdateSubscriptionEvent
ID: "5" This event occurs when a Subscription is changed.
VoidOrderEvent
ID: "VoidOrderEvent"
This event occurs when an order is canceled/voided.