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 212
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