LogoLogo
ThreeKitDeveloper HubForumsSupportStatus
  • Guides
  • Documentation
  • Releases
  • Platform Documentation
  • Project Data
    • Platform Landing Page
    • Basic Concepts
      • Environments
      • Organizations
      • Attributes
        • Arrays
      • Tagging
      • Naming Conventions
      • Players
      • Branching
      • Alerts and Warnings
      • Supported Browsers
      • ThreeKit Platform Architecture
    • Catalog
      • Items
        • Item Bulk Edit
        • Item Variants
      • Data Tables
      • Item Rules and Logic
      • Publishing
    • Assets
      • Asset Management
        • Importing Assets
        • Exporting Assets
        • Folders
      • Asset Editor
        • Editor Layout Modes
          • Layout Editor
            • Local vs Global Transform
          • Logic Editor
      • Nodes
        • Common Properties
          • Node Tags
        • Helpers
          • Nulls
          • Model References
          • Connectors
        • Lights
          • Point Light
          • Directional Light
          • Spot Light
          • Area Light
          • Hemisphere Light
          • Shadow Plane
        • Cameras
        • Shapes
        • Annotations
        • Layout Containers
      • Scenes
      • Materials
        • Physical Material
        • Proxy Materials
        • Multi Material
        • Gem Material
        • JSON Configuration
      • Textures
      • Canvases
      • Composites
    • Operators
      • PolyMesh Operators
        • Array
        • Bend Deformer
        • Map Override
        • Stretch
        • Physics (Collision Detection)
      • Material Operators
        • Falloff
        • Tiling Override
        • Triplanar Mapping
        • Template Override
      • Image Operators
        • Canvas Composite
        • Canvas Fill
        • Canvas Linear Gradient
        • Canvas Text
        • BlackWhite
        • Posterization
      • PostEffects Operators
        • Bloom Pass
      • Comp Layer Operators
        • Vray Normals Properties
        • Vray Bump Normals Properties
    • Stages
      • Stage Effects
        • Turntable
    • Logic
      • Conditions
      • Actions
      • Queries
        • Node Queries
        • Metadata Value Query
        • Asset Query
        • Datatable Query
      • Custom Scripts
    • Virtual Photographer
      • Create Renders
      • View Renders
      • V-Ray Integration
    • Augmented Reality
      • AR Settings
  • Org Setup
    • Admin & Security
      • Org Profile
      • Users & Permissions
        • Threekit Sign-in
        • Members
        • User Profile
      • Tokens
      • Service Accounts
      • ISO Certification
      • Org Migration / Data Transfer
    • Jobs System
    • Orders
      • Orders List
      • Configurations
    • Analytics
      • Advanced Buyer Analytics Reports
      • Player Views
    • Project Settings
      • Features
      • Languages
Powered by GitBook
On this page
  • Introduction
  • SETUP
  • LOGIC
  • Step 1
  • Step 2
  • Step 3
  • Step 4

Was this helpful?

Edit on GitHub
  1. Project Data
  2. Logic
  3. Queries

Datatable Query

Query and fetch specific data entries from a given Data Table

PreviousAsset QueryNextCustom Scripts

Last updated 1 year ago

Was this helpful?

Introduction

This type of query enables users to read data from , and then make use of that data inside rules.

There are many possible use-case examples of this, with one of the most common being the retrieval of SKU information for a particular configuration variant.

Let's imagine we have a custom shelf unit configurator, where the customer can pick a number of different columns and shelves to cover a wall. On the manufacturer's back-end, the shelves may be stored either as single packs or as 3-packs, each with their own unique SKU.

SETUP

Here is an example of a data table representing the SKUs for these shelving components. The data table shows the different SKUs for these various options depending on shelf type and color choice.

We would need to setup the main Shelf Configurator Item with the following workflow:

  1. First, the user makes a choice of shelf type with a particular color in the configurator.

  2. We need to calculate how many shelf packs are needed, and of which type - If the user chooses 10 shelves, that would result in a total of three Packs of 3 plus a pack of 1. You can store this in PackTotal attributes for each type of bundle.

  3. Retrieve the appropriate SKUs for each pack bundle, and store it in an attribute for the front-end. We will focus on the 3Pack in this example, and use the attribute Shelf_3Pack_SKU.

In a real scenario things can get more complex, with multiple shelf type selections.

The front-end will then need to populate an order page with the list of SKUs for all components chosen.

LOGIC

In our example we will focus on the 4th Step listed above.

This is how the query logic might look on the main Shelf Configurator Item, to read the SKU from the data table.

Currently, the datatable query can only be used with attributes of type String, Number, or Asset, even though the UI may display the option for other types as well.

Step 1

Create a set attribute value action, and select the Shelf_3Pack_SKU attribute.

Step 2

Choose the datatable query option in the To slot, and pick the Data Table from the list that contains the SKU information shown above.

Step 3

Choose to select which column we want to query. In our case we need to receive the 3 Pack SKU value for a given configuration, so we pick that column.

Step 4

Click the + Add Parameter button to add new configuration entries. In our case, we need to find the SKU for the Product Name + Color Choice variants.

On the left we choose the column name, and on the right we choose which value in that column to search for. The value can only be represented through an attribute, so we make use of the ProductName and ColorName attributes listed above. These attributes would receive their value from metadata on the catalog items.

Determine which product was chosen, and which color choice was made through the use of metadata fields on their corresponding items. Use to read those values into String attributes locally.

Datatable queries can only work with attribute values. This means that you have to make use of in order to read the name of the Product, or the name of the Color choice.

metadata value queries
metadata value queries
Data Tables
Data Table Example
List of Attributes
Create the Datatable Query