Loading
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Order Activated Example for Order Management Integration Layer

          Order Activated Example for Order Management Integration Layer

          The Order Management Integration Layer sends this notification when the order management system fulfills orders that are either original or supplemental orders. The notification is sent to CPQ when the order is activated. The optional fields parameter can include any data that must be set in order fields.

          When fulfillment is successful for all products in the Order, Odin assetizes all the order items and updates these fields:

          • Order.OrderStatus__c = 'Activated'
          • Order.FulfillmentStatus__c = 'Activated'
          • Order.Status = 'Activated'

          For example, the following Order Activated notification includes a fields section that contains a list of fields to update in the order record. It will call the OrderBackSync Omnistudio Data Mapper by default.

          [
            {
              "orderId": "8011U000000Tq5l",
              "state": "Activated",
              "fields": {
                "vlocity_cmt__JeopardyStatus__c": "Green"
              }
            }
          ]

          Order Activated notification including the meta parameter and updateMethod:

          [
            {
              "orderId": "8011U000000Tq5l",
              "state": "Activated",
              "fields": {
                "meta": {
                  "updateMethod": "directfieldupdate"
                },
                "vlocity_cmt__JeopardyStatus__c": "Green"
              }
            }
          ]

          The fields parameter supports the meta parameter and its updateMethod, which can have the following values:

          • dataraptor (the default): Order Management Integration Layer calls the Data Mapper for the object.

          • directfieldupdate: Order Management Integration Layer collects the values of all the fields in the fields section and sets them in the the SObject for which the notification is sent. If the field name that comes in the notification does not exist on the sObject (Order or OrderItem), then that field is skipped. Order Management Integration Layer also skips field names with dot notations. This will set the field names and values exactly as they appear in the notification. The directfieldupdate value supports field names with and without a specified namespace.

          Note
          Note

          All Order Management Integration Layer notifications support updateMethod and its directfieldupdate value, including order-level and order-item-level notifications.

          You can use Apex code for invoking the Order Activated notification, as shown in the following sample:

          Map<String, Object> orderInputMap = 
            (Map<String, Object>) 
            JSON.deserializeUntyped('{\"orderId\": \"8013i000000qvWhAAI\",
            \"state\": \"Activated\",\"fields\": {\"JeopardyStatus__c\": \"Green\"}}');
          OdinService.notify(new List<Object> { orderInputMap });
           
          Loading
          Salesforce Help | Article