Get From Bag

Get From Bag

Get From Bag action is used to read data belonging to a specific basket (bag) from the system on the Kuika platform. With this action, content previously added to the basket using Add to Bag can be retrieved, listed on the screen, viewed in detail, or used in workflows. It is ideal for maintaining user-specific data flow in applications such as e-commerce, reservations, and form caching.

Technical Features

  • Retrieving Bag Data: Retrieves all data associated with the specified bag key.
  • Data Listing and Processing: Incoming data can be transferred to screen components, lists, or calculations.
  • Web and Mobile Compatibility: Works seamlessly with both web and mobile projects.
  • Data Freshness: Items added to or removed from the cart can be viewed instantly.
Get From Bag Action Application Steps

Defining the Action in UI Design

  1. Log in to the Kuika platform.
  2. Select your project from the Apps screen.
  3. Go to the UI Design module.
  4. Open the screen where you want to display the cart contents.
  5. For example: ‘My Cart’, ‘Favourite Products’ or ‘Previous Selections’ screen.
  1. Add the Table element from the Elements panel on the left side.
  2. To ensure that the data is retrieved when the screen loads, add the
    • + ADD ACTION → appropriate trigger (Initial Actions, OnClick, etc.) → Bag → Get From Bag action from the Properties panel of the screen.

Configure Action Parameters

  • Bag Key (Required): The value that identifies the cart. This parameter is entered as a constant. Examples:
    • ‘default’ (default cart)
    • ‘wishlist’ (favourites cart)
    • “user_” + currentUser.id + ‘_cart’ (user-specific cart)

Connect the Data to the Table Element

  • Display the products to the user by binding the action's output to the Items or Data property of the listing component.
  • For example: TableView.Items → Action Result > Get From Bag

With this structure, the user can automatically see the products in the relevant cart when the screen loads.

Usage Scenario: Listing Products in the User's Cart

In an e-commerce application, when the user enters the ‘My Cart’ screen, the previously added products must be displayed. For this process, the Get From Bag action is used to retrieve the relevant cart data and present it to the user via the list component.

Configuration Steps:

  1. UI Design module, create the ‘My Cart’ screen.
  2. Add the list component (ListView, Table, etc.).
  3. Define the following action for the OnClick event of a button on the screen:
    • + ADD ACTION → Bag → Get From Bag
  4. Enter the Bag Key value as a parameter:
    • Example: ‘default’ or ‘currentUser.id + “_bag”’.
  5. Bind the action result to the data source of the Table element to display the contents to the user.
Get From Bag Action Advanced Customisations
  • Conditional Display: Incoming content can be filtered and separated according to specific categories or conditions.
  • Empty Basket Message: If the returned data is empty, the ‘Your basket is empty’ message can be displayed with the Notify action.
  • Total Amount Calculation: The total value can be calculated dynamically based on the price information of the incoming products.

Technical Risks and Precautions

  • Empty or Incorrect Bag Key: If the Bag Key value is empty or not defined in the system, the action returns empty data. Make sure that the correct key is used.
  • Empty Data Management: If the cart is empty, the application should not throw an error; appropriate information should be provided to the user.

Get From Bag is a critical action for maintaining user interactions, remembering selections, and completing shopping processes. When used in conjunction with other bag actions, it provides powerful and dynamic data management.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar