Bag actions, available on the Kuika platform, are auxiliary actions used to store, manage, and perform conditional operations on temporary data within the application.
Bag facilitates the tracking of dynamic data within the application by holding specific key-value pairs. User interactions, form data, or process results can be stored in the bag and reused in subsequent actions.
Purpose
Bag actions can be used in many scenarios, such as temporary data storage, process flow control, data comparison, or conditional routing. They are particularly suitable for managing data used in multiple steps within an application.
Advantages
Enables temporary data management without writing code.
Offers a flexible structure for conditional flows and controls.
Easily transfers user inputs or process results to the next step.
Can be used for global or screen-based data transfer.
Bag Actions Available on the Kuika Platform
Add to Bag: Adds a value with a specified key name. If the same key has been added previously, it is updated with the new value. For example, when a user selects a product, the ID of that product is added to the Bag with the key ‘selectedProductId’.
Bag Has Key: Checks whether a specific key exists in the Bag. It is typically used in conditional operations. For example, if the ‘selectedProductId’ key is in the Bag, the user is redirected to the product details page.
Get from Bag: Retrieves the value corresponding to the specified key in the Bag. This value can be assigned to another action or form field. For example, the ‘Product Name’ field in the form is automatically filled with the value retrieved from the ‘selectedProductName’ key in the Bag.
Remove from Bag: Remove the specified key from the Bag. It is used especially in scenarios such as session termination or form reset. For example, when the user clicks the ‘Clear Cart’ button, the ‘selectedProductId’ key is deleted from the Bag.
Clear Bag: Clears all key-value pairs from the Bag. Typically used to reset all temporary data when the user logs out. For example, when the user exits the application, all temporary data associated with the session is cleared from the Bag.
These actions, when used in conjunction with other system actions such as Set Value, Condition, Navigate, and Notify, help you create more controlled and flexible data flows in your application. The Bag structure allows you to manage in-app data transfer in a practical and effective way, especially when backend calls are not made.