• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

E9.2 ORCH Send message with Sales Order Information

Hello All.
I'm new to all of this and working on a project to send a message with sales order shipment information. The problem is that I want to show details for multiple lines from the sales order in a single message. I thought I could create an orchestration and run it on a nightly schedule. The first step would be a data request to bring back all (distinct) orders that shipped today in a dataset. Then connect to a child orchestration which loops thru that list and finds all the lines per order and sends the message. We are running 9.2.4.0 tools.

The first challenge is getting the list of distinct orders. Is it possible to return a list of distinct values from a Data Request?

The second challenge is creating the body of the message. Is it possible to concatenate values in a dataset? Could this be achieved with a custom groovy script.

Thanks for any help!
Angie
 

Aarto

Reputable Poster
HI there! You could get the list of distinct order numbers (or shipment numbers) by using aggregation in your data request i.e. group by the key fields that make the order/shipment distinct (KCOO, DCTO, DOCO, DELN for example). and then pass the results to a second orchestration to send the message (or other logic)

Your challenge will be to send (from the second orchestration) a single email by each order/delivery containing a list of included order lines (details of the shipment) though and this is where you probably need to create a groovy script to iterate through the shipped order lines with same key and build a an array with order lines information. However, I do not believe you can pass arrays/lists to your message request, only single variables/strings. If you try to concatenate order line information into a single string variable, you may run into limitations on maximum string length.

So it is relatively simple to send an email with aggregated/sumarized data (total number of lines, total amount etc.) but sending a message with line details in a tabular format would be challenging and i do not know how that could be done)

Aarto
 
Hello Angie, the concatenation in Groovy can be a little bit tricky but it can be done. I made something similar last week.
Now the Message doesnt have rich text so is very simple message.

If you cannot get the dataset using a DataRequest an option could be create a Connector to the DB and get it thru sql.
 

Attachments

Discover how to build no-code data integrations and business process automations.
Top