Hi
I have an Order and a Shipping project. When orders are complete a shipping task is create via an automation. Works great, shown below.
I have now learned that at some point during the order process it is known that it may consist of multiple shipments. Each shipment should be its own shipping task.
I have created a "number of shipments" custom field on my order task. In my "create shipment from order" automation i would like to create that number of clones of the order tasks as shipping tasks. Somewhere in my automation i need a loop if sorts, but i can only seem to get automations to loop over lists of things and not at 1..x simple for loop.
Is this only something that i can do with external scripts or rest api's or is there some smartvalue trick that can used here?
My current solution is a manual automation trigger for creating more shipments, but it is not as neat as i could wish for.
Thanks in advance for any help.
My current automations, create shipping from order and create next shipping:
Hi @JensH ,
Unfortunately there is not looping feature in automation. There is this request that has been open for the suggestion https://codebarrel.atlassian.net/browse/AUT-1312
What you can do is to simply use the If/else condition to create the number of clones that you want. For example,
If custom field equals one then create one clone
If custom field equals two then create two clones
etc
Does this make sense?
Thanks @Jack Brickey !
It makes perfect sense for just doing the unrolled for-loop with if-statements. Thanks for reminding me of things that i once learned but forgotten :)
Best
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.