Field Service

Get Involved. Join the Conversation.

Topic

    Vi Giout
    Use the exchange message notification
    Topic posted January 18, 2019 by Vi GioutBronze Medal: 1,250+ Points, tagged API / Integration, Configuration, Inventory / Parts 
    52 Views, 3 Comments
    Title:
    Use the exchange message notification
    Summary:
    Add custom fields to the two inventory blocks
    Content:

    We would like to use the exchange functionality between inventories. The case would be for a technician to replace a mulfunctioned client inventory item with one of his own inventory pool. 
    Since we are integrating with Oracle Supply Chain Management, we would like to raise notifications to inform the Oracle Integration Cloud Service of the transaction. 

    Can we add custom fields to the two inventory blocks. How do I refer to them respectively? The documentation only mentions about id and serial number and we havent managed to make it work with anything else, even with vanilla properties such as inventory type

    Code Snippet:

    Comment

     

    • Richard Laird

      Not quiet sure what your requirement is here? Are you able to expand on it please? If it's just custom properties against the inventory object then that should be easy enough The challenge you'll have is where these fields can be filled in.

      When I looked at using the exchange functionality in our implementation, we were limited to what we could do here as when the engineer was making the exchange, we wanted them to be able to add additional details of the removed inventory before the exchange took place. Sadly, this isn't available in the product due to the screens not being available for configuration. Would be great if it was added to their road map.

      • Vi Giout

        Lets say I have two inventories to be exchanged 

        1) id = 199, sn = P19012901, item No= 19012901, subinv =  123, invType = POS (4)
        2) id = 113, sn = M1001, item No= 1001, subinv = abc, invType = Monitor (2)

        I am adding the custom fields item No and subinv to the above message and the vanilla property inventory Type. I am trying 3 different ways to address to the exchanged inventory since this is not very clear on the documentation. 

        The message becomes:

        <inventory>

           <inventory_id>{invid}</inventory_id>
           <serial_number>{inventory_serial_number}</serial_number>
           <item_number>{pr_il_inv_item_num}</item_number>
           <subinv_id>{pr_il_inv_subinv_id}</subinv_id>
           <invtype>{invtype}</invtype>
        </inventory>
        <exchanged>
           <inventory_id_ex>{inv_change_invid}</inventory_id_ex>
           <serial_number_ex>{inventory_ex_serial_number}</serial_number_ex>
           <item_number_ex>{pr_ex_il_inv_item_num}</item_number_ex>
           <subinv_id_ex>{pr_inventory_ex_il_inv_subinv_id}</subinv_id_ex>
           <invtype_ex>{invtype}</invtype_ex>
        </exchanged>
         
        I am getting as result:
         
        <inventory>
           <inventory_id>113</inventory_id>
           <serial_number>M1001</serial_number>
           <item_number>1001</item_number>
           <subinv_id>abc</subinv_id>
           <invtype>2</invtype>
        </inventory>
        <exchanged>
           <inventory_id_ex>199</inventory_id_ex>
           <serial_number_ex>P19012901</serial_number_ex>
           <item_number_ex>{pr_ex_il_inv_item_num}</item_number_ex>
           <subinv_id_ex>{pr_inventory_ex_il_inv_subinv_id}</subinv_id_ex>
           <invtype_ex>2</invtype_ex>
        </exchanged>
         
        Which means that none of the ways I am trying returns the exchanged inventory correctly for any other property besides the documented ones (inventory id and serial number). I understand that this might not be supported. We will have to ask from the integration to make a 2nd operation to retrieve again all the information from the two inventories to get the additional fields needed. 
        • Antonio Carmona

          Hello,

          I guess you tried not to include "_ex_" for those tags that are not matching, did you?

          If you still face problems let me know.

          <inventory>

             <inventory_id>{invid}</inventory_id>
             <serial_number>{inventory_serial_number}</serial_number>
             <item_number>{pr_il_inv_item_num}</item_number>
             <subinv_id>{pr_il_inv_subinv_id}</subinv_id>
             <invtype>{invtype}</invtype>
          </inventory>
          <exchanged>
             <inventory_id_ex>{inv_change_invid}</inventory_id_ex>
             <serial_number_ex>{inventory_ex_serial_number}</serial_number_ex>
             <item_number_ex>{pr_il_inv_item_num}</item_number_ex>
             <subinv_id_ex>{pr_il_inv_subinv_id}</subinv_id_ex>
             <invtype_ex>{invtype}</invtype_ex>
          </exchanged>
           
          Regards,
          Antonio.