Loading
Industries Order Management
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
          Saving Values from Order Management Plus to Salesforce

          Saving Values from Order Management Plus to Salesforce

          You may need to save certain parameters from Order Management Plus to Salesforce assets. For example, a provisioning system may respond to Order Management with a device serial number and this information needs to be stored in Salesforce (to be accessed by Technical care team).

          In Salesforce, there are fields and attributes that behave differently in Order Management.

          Examples of Attributes and Fields on an Order Product Detail

          In Order Management Plus, there are attributes and characteristics.

          Examples of Attributes and Characteristics

          Consider the following example of a Mobile line order:

          Example of a Mobile line order

          Assuming the required attribute value appears on the Provisioning CFS Order item, there is a process of three steps to save the value to the corresponding asset:

          Example begins with: Order Item Provisioning CFS. Step 1: Order Item Mobile Plan. Step 2: Order Item mobile plan. Step 3: Asset Mobile Plan.

          To save the value to the corresponding asset:

          1. Propagate the value to a source order item:
            • Save the value to any source order item. Only source order items are considered as input for step 2.

            • Normally, the changed parameter is a Characteristic in Order Management Plus. Use this out of box auto task to propagate the value to a corresponding characteristic on the source Order Item. There is no out of box auto task to copy an attribute value, so create a custom auto task in this case.

          2. Propagate the value from a source order item to a Salesforce order Item:
            1. Prepare the payload. Kafka2Sfdc service is responsible for sending Order and Order Item updates from Order Management Plus to Salesforce. The payload is generated from:
            • All characteristics of an order item
            • All attributes with specified Salesforce names, so ensure attributes have Salesforce names.The payload from Order Management Plus to Salesforce has the following format, where fields is a set of all attributes with a specified Salesforce name, and describedBy is a set of characteristics:
              {
               "orderItemId": "8028E00000153Xc",
               "state": "Activated",
               "fields": {
                "ThorJeopardyStatus__c": "Green",
                "LineNumber__c": "0001.0001",
                "ServiceAccountId__c": "0018E00000eMXkw",
                "TechnicianApproved__c": "No",
                "Action__c": "Add",
                "OrderItemNumber": "0000000348",
                "AssetReferenceId__c": "436b0c0c-ac86-d080-4fc2-f33ecbdf64c4",
                "ExpectedCompletionDate__c": "2018-05-29T05:03:15.731Z",
                "Id": "8028E00000153Xc"
               },
                "describedBy": {
                 "Type": "493824",
                 "Brand": "49834",
                 "ATTR_Model": "4934",
                 "Serial_Number": "4973948",
                 "ATTR_MAC_Address": "394839",
                 "ATTR_Purchase_methods": ""
               }
              }
            • Send the payload. By default, kafka2sfdc sends Order and Order Items updates at the end of order fulfillment. You can initiate the update earlier with a few lines of code in a custom adapter:
              //TO be Autowired
              KafkaFactory kafkaFactory;
              ActiveRecordService ars;
              //This is how to force update the order
              OrderKafkaProcessor orderKafkaProcessor = new OrderKafkaProcessor(ars, env, kafkaFactory);
              orderKafkaProcessor.onStateChanged(orderId, Order.StateValues.ACTIVATED.getId());
              // This is how to force update the order item
              OrderItemKafkaProcessor orderItemKafkaProcessor = new OrderItemKafkaProcessor(ars, env, kafkaFactory);
              orderItemKafkaProcessor.onStateChanged(orderItemId, Order.StateValues.ACTIVATED.getId(), orderId);
            • Use the REST controller in Salesforce to process the payload. The REST controller saves the describedBy block into Salesforce attributes (JSONAttribute) and uses the out of the box DataRaptor to save fields. The result is that:
            • Order Management Plus characteristics from source order items are saved as Salesforce JSONAttribute.

            • Order Management Plus attributes with specified Salesforce names are saved as Salesforce fields

          3. Propagate the value from the Salesforce order item to an asset. Order Management uses the CPQ API to create and update assets, where order item parameters are copied to assets, assuming they are assetizable.
           
          Loading
          Salesforce Help | Article