Trying to trigger multiple Actions and multiple Tables with Bots

I have done a bit of digging and found some good articles, but I think I just need helping getting this all straight in my head.

My app is to help me track my 3D printing Orders. I have an ‘Orders’ object, and a ‘Parts’ object. I have a few order sources, and up until now I have been inputting them all manually into my app. I have a WooCommerce eStore that takes orders on my website. I have recently created a way to import these orders into my app. I have created ‘WC Orders’, and ‘WC Parts’ tables that take in the data from the WooCommerce site and clean it up, so I now just have to click an ‘Import WC Order’ button, followed by ‘Import WC Parts’ button. (These are grouped actions, that will copy the fields to a new line in the ‘Orders’ and ‘Parts’ tables respectively, and then mark them as imported so they wont show on the table after they are imported.) I realized that the ‘Order Total’ field was not updating, so I then created another button to recalculate that field. (whew… Exposition done…)

I am now trying to automate “the pressing of the buttons”…
-Hitting refresh on the WooCommerce Synced Table (Done with an external API that connects WooCommerce with Google Sheets)(I dont think there is anything appsheet can do about this)
-Hitting Sync on the Appsheet app to work with that new data
-Going to ‘WC Orders’ View and selecting the order I want to import. Then hitting the Import button which imports the order, and marks it as imported.
-Waiting a second for the Order to Import and Sync
-Going to ‘WC Parts’ View and selecting the corresponding parts I want to import. Then hitting the Import button which imports the parts, and marks them as imported. ( The imported parts have a ‘This.Row’ key that finds the corresponding ‘Order’ based on a shared key.)
-Then hitting the “recalculate” button on the imported order.

All of this works great so far, just very manual. The Bot I want to create would preform these actions for me.

I can trigger a bot based on an “Imported” field on the ‘Order’ table when I click the “Import WC Order” action button. But I am having the darndest time trying to figure out how to chain “call a process” together.

I can create processes that “Call a data Action” for each one of the action buttons listed above. But the “Call another Process” asks for a key field, and I am wondering if that is what ties the ‘Order’ to the ‘Parts’ or… Will this not work because ‘Orders’ can have multiple ‘Parts’… Since the ‘Parts’ can “find” the ‘Orders’ they are attached to, Should I be looking for a way to just trigger them as they come in?

To be honest, I am just spinning in my own head at this point. I could also just be going about this in a backwards way and there may be a much simpler solution that I am just not seeing.

0 3 207
3 REPLIES 3

Instead of using “Call a Process” within a bot process you could always make a bot for each table. If you go this route, be sure to go to options within the bot and turn on “Trigger other bots”. The “Call a Process” was never something I could figure out therefore I just made different bots for each table as well as using the action “Execute an action on a set of rows” as much as possible. Hope this helps.

Hey Andrew, good call on the separate bots, the whole Call Process is blowing my mind a bit.

So one bot that is triggered when I import the orders on a trigger field. The bot then imports all parts in the WC Parts table that are Imported=Blank. Then the last bot is triggered on a new add to the Parts table were Imported=yes, for a recalc on the order total. Would that work?

I think that should work, you might not need to use separate bots though after reading this. You could just use the action “execute an action on a set of rows” paired with the respective action you have already made. Likewise you can trigger a bot from google sheets using External eventing with Google Sheets | AppSheet Help Center

Top Labels in this Space