0

Can you interact with the states of objects provided by commercetools?

I have reviewed the documentation here and understand how to create new states and transition through them. Is it possible to change the state flow of a cart or a lineitem? The scenario I'm thinking about is injection an approval workflow after a cart is submitted and once a cart is approved the regular flow is returned.

Thanks in advance.

dan
  • 1

1 Answers1

1

the scenario you describe could be addressed with an API extension on a cart. Please have a look at the docs for more information.

Stefan Meissner
  • 322
  • 1
  • 5
  • I feel a state level customization is cleaner in this scenario, if it can be done. Existing logic around displaying an orders history would be aware of the approval flow. I can kick off an approval flow utilizing an API extension but it is not clear how to hold off existing logic around shipping, payment capture, etc until the approval workflow has been completed. – dan Sep 24 '18 at 20:53