Trying to send order_id / tracking number after order has been marked "shipped"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cbarber
    Mivite Lite

    • May 2025
    • 4

    #1

    Trying to send order_id / tracking number after order has been marked "shipped"

    Hello,
    After an admin marks an order as shipped I'm trying to have it send a POST to an external API with the order_id / tracking number. Is the "Module_Order_Content" function the correct one to be using for this? I tried updating it to log text to the console but I'm not seeing anything after updating an order. Are there any examples out there using these functions or are there any tips for testing/debugging?

    Thanks,
    Caine
  • Nick
    Super Moderator











    • Dec 2011
    • 576

    #2
    cbarber You can use an Order Workflow that will trigger when an order is marked as shipped then have an action that will post the JSON data to Webhook URL that you have setup to process the data. Here are some screenshots of the setup:

    trigger.JPGcondition.JPGaction.JPG

    https://docs.miva.com/developer/deve...der-workflows/
    Attached Files
    Nicholas Adkins
    Technical Training Specialist / Miva, Inc.
    [email protected]
    https://www.miva.com/mivalearn

    Comment

    • cbarber
      Mivite Lite

      • May 2025
      • 4

      #3
      Hey Nick , appreciate the response! I saw I was able to do it that way but I should've clarified: I'm working on a module and was hoping that everything would be self contained / setup on install for a store. Is there a way to achieve a similar result using MivaScript? thanks, Caine

      Comment

      • cbarber
        Mivite Lite

        • May 2025
        • 4

        #4
        In case anyone else runs into this, here was the documentation I was provided to work with to create a Workorder via Mivascript: https://github.com/mivaecommerce/miv...derworkflow.mv

        Comment

        Working...
        X