• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Recipe Building Questions
J

Joe Buscemi

started a topic about 2 years ago

Working with embedded lists

I am dealing with Sales Orders. I receive a Sales Order and have to send a (http) message to the warehouse system (to ship). Basically I receive a message with the following (simplified) format:

{

    Order Header Info

    header note 1

    header note 2...

    Items 

    [

        item number

        description

        note_1

        note_2

        shipping note

        packing note

    ]

}

So each order has header data, individual multiple header notes, and then a list of items with individual multiple line notes. I need to turn this into a properly formatted http json message to the warehouse system, which is (simplified)...

{

    Orders [

        Order Header Info...

        Items [

            item number

            description

            Item Notes [

                item note

            ]

        ]

        Order header notes [

            header note

        ]

    ]

}

Basically the WMS will accept multiple orders in one message, but I am only sending one at a time. Within the message to the WMS, there is order header info including an array/list of order header notes and an array/list of items are with an array/list of notes for each item.


I'm able to manage the order header info and order header notes into the outgoing http message (via Mapper). I placed the items into a List (Order Details - Lines) with the last element of the list being an array itself for comments, basically a matching subset of the Order Master message itself. 

image


I loop through all input order lines, reformatting the line item comments into a list, and then add each item and its comments to the "Order Details - Lines" list. Finally, I try to map the order header, header comments and line items to a common data mode. Header info and Header comments work fine. And while I can use "Order Details - Lines" as list input to the "item_details" of the common data model to map the detail items, I'm not able to map the "order_detail_comment" (list within the list) because it remains unselectable as a list input in the common data model. 


Any suggestions on how to handle/build a list within a list and then use that output to map to a similar message/common data model format? Or what's the best method to build (i.e. map) data to an outgoing http message that contains arrays/lists within arrays/lists?


Thank you


1 person has this question
Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count