Search Results for

    Show / Hide Table of Contents

    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. Create Inventory Items API Adding An Inventory Item in Corp Admin

    CreateOrderEvent

    ID: "CreateOrderEvent" This event occurs when a customer creates a new order within the DirectScale Platform. Subscribing to this event will notify the subscriber that an order has been created but not finalized. While the order is created and the event has triggered, the order will still be pending. Additional payment and shipping processing must take place for the order to become "Finalized".

    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 Event Sample>>:

    {
       "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. Unlike new orders, which initially display as a “Pending Processing” status, new payments do not require a finalization process and can display a variety of statuses upon creation. Statuses include “Pending”, “Paid”, or “Rejected”.

    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.

    Insert Payments API

    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. IMPORTANT: It’s important to note that this event also triggers for item options when either the parent item is deleted, or a specific option or set of options are removed.

    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 Event Sample>>:

    {
       "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. You can view finalized orders of different order statuses in Corporate Admin.

    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. Event Sample>>:

    {
       "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 CreateInventoryItemEvent UpdateInventoryItemEvent DeleteInventoryItemEvent

    OrderEvent

    ID: "1" Currently, the OrderEvent model, used by the Order Processed Event, assigns the Order Payment’s status to the OrderStatus property. Order and payment statuses must be present in events but not at the same time. The Order Processed Event communicates incorrect data to those who subscribe to it; as a result, it will be deprecated.

    Use the following events instead:

    • CreateOrderEvent
    • FinalizeOrderEvent
    • CreateOrderPaymentEvent

    OrderEventBase

    A class with properties shared between Order Events CreateOrderEvent UpdateOrderEvent FinalizeOrderEvent VoidOrderEvent

    OrderPackageEventBase

    A class with properties shared between Order Package Events SubmitOrderPackageEvent UpdateOrderPackageEvent UpdateOrderPackageStatusEvent

    OrderPaymentEventBase

    A class with properties shared between Order Payment Events CreateOrderPaymentEvent RefundOrderPaymentEvent

    OrderPaymentStatusEventBase

    A class with properties shared between Order Payment Status Events UpdateOrderPaymentStatusEvent

    RefundOrderPaymentEvent

    ID: "RefundOrderPaymentEvent" This event event occurs when a payment is entirely (or partially) refunded. The refund process is unique because payments are never voided or removed from orders but offset by other payments creation instead.

    StockLevelEvent

    ID: "StockLevelEvent" This event occurs when an inventory item stock status changes. Stock Levels Guide

    SubmitOrderPackageEvent

    ID: "SubmitOrderPackageEvent" This event occurs whenever a package is ready to be submitted to logistics providers for fulfillment. It is important to note the following:

    • 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 Event Sample>>:

    {
       "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. Inventory items may be updated through the Update Item Public API endpoint, or using the Inventory page in Corporate Admin. Update Item API Adding An Inventory Item in Corp Admin Event Sample>>:

    {
       "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. These metadata fields include:

    • 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 Event Sample>>:

    {
       "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. Typically, this occurs when an integrated logistics provider notifies DirectScale that a package’s carrier and tracking information has been updated. This event may happen multiple times for a given order package. Please note that any change in the status of an order package will also trigger this event as carrier and tracking info and shipping dates are often updated alongside the status.

    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. Additional processes are triggered whenever an order cancellation occurs, such as recalculating the order’s Associate’s commissions. Order cancellation may happen through Corporate Admin or the Public API Cancel Order endpoint. Cancelling an order in Corp Admin Cancel Order API

    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX