Running Actions in a Loop (Conditionally)

I have a use case to simplify let take an example.

Assume we have product that can be bundled.

Product A is single SKU. Product B is bundle of Product A plus some extra cost (eg packing cost). Product C is bundle of Product B plus some extra cost.

User has option to either modify the price of Product A or Modify the extra cost associated with Bundle of Product B and C.

Now when user change Price of Product A, that should reflect changes to Product B and Product C.

Additionally, User can also keep the price of Product A same but change the packing cost of Product B which will change price of Product B and hence price of Product C.

I am trying to solve this by creating an action that recalculates the price but I have to run the action 'n' number of times for the changes to traverse through different level.

Is there a way to automatically run the process a set number of times based on which Level, A,B,C (user made the change).

I might have oversimplify the ask, so let me know if I can clarify.

Tagged:

Answers

  • KirillKuznetsov
    edited May 13

    Hi @sagarkpr

    I think you did actually oversimplified your case as per above it does not really look like a loop because it goes linear: Product A → Product B → Product C.

    If it was Product A → Product B → Product C and then Product A again - then it would be a loop. In this case, to run an action multiple times you would need to create a script and schedule it (with a task scheduler or something similar) to run every 1-2 minutes (depending on the complexity of the calculation). You can add a trigger which will run the actions schedule loop and switch it off when you get the result you need.

    Otherwise, you should be able to build dependencies and mappings of one product to another without actions.

  • I knew I must not have been explaining it correctly.

    Product A, B, C are all in a list member and further more there are other Product like X, Y,Z that also have dependency on one another.

    I have the dependency mapped in another module that shows which product is depending on which product

    ex

    Item | Depend on Product

    Product A | BLANK

    Product B| Product A

    Product C| Product B

    Product X| BLANK

    Product Y| Product X

    You mention option of script. Can you elaborate. Does Anaplan allow writing these scripts? or would this be written in like Anaplan CLI interface.