# Integrate Virto orders with external systems via Logic Apps

**URL:** <https://www.virtocommerce.org/t/integrate-virto-orders-with-external-systems-via-logic-apps/86>\
**Category:** howto\
**Tags:** module, integration, logic-apps\
**Created:** [November 11, 2019, 8:45am UTC](https://www.virtocommerce.org/t/integrate-virto-orders-with-external-systems-via-logic-apps/86 "2019-11-11T08:45:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eMazeika](https://yyz2.discourse-cdn.com/flex032/user_avatar/www.virtocommerce.org/emazeika/32/28_2.png) [@eMazeika](https://www.virtocommerce.org/u/eMazeika)\
**Post date:** [November 11, 2019, 8:45am UTC](https://www.virtocommerce.org/t/integrate-virto-orders-with-external-systems-via-logic-apps/86/1 "2019-11-11T08:45:19Z")

</div>

Suppose, you have a scenario like this:

_Each new order in Virto Commerce should be sent to a logistics company using its REST API. Instead of scheduled execution every X minutes, the customer would prefer to have more control over this process. One option could be initiating the synchronization right after the checkout process is completed._

_Or, could a grace period be added? So that a customer could change/cancel the order._

**The solution**

Straightforward to implement in a custom module and Azure Logic Apps:

1. Create a Logic App for getting the order from Virto Commerce, transforming and sending it to external API;
2. Create custom Virto Commerce module:
  1. Create Order event handler, subscribe to Order events, and filter the orders with status “New”;
  2. Make an HTTP request to trigger the Logic App;
  3. The (optional) grace period step: create a background job to make the HTTP request after X min. delay, if order wasn’t canceled;

3. Logic App gets the order by Id and processes it.
  - the Logic App could add the processing info, if any. Or just change status to “Processed”.

 ![Integration via Logic Apps](https://canada1.discourse-cdn.com/flex032/uploads/virtocommerce/original/1X/0412fbcdfce45ce09389a26126031c0ee718b9b5.png)

Also, check our [samples](https://github.com/VirtoCommerce/vc-samples).
