Understanding EntityID, FolderID, and EntityFolderID

Last Updated: 07/18/2016 Introduced in Verision: 2.0

 

This topic helps identify the relationship between the IDs for folders and their containing entities.   

About FolderID

A FolderID is an ID that is used to uniquely identify a folder. Every folder in the Portal has a folder ID, and one way of seeing the ID is to select Manage > Get Folder ID from the folder itself.
get folder id
 
 
 
The ID is in GUID format (this is the standard structure for IDs in the Portal):
 id
 
 
If the folder is of type Folder Extension (i.e., a custom-defined folder type) instead of Get Folder ID, the Manage menu on the folder will show Get [folder extension name] ID. Even if a folder is of a custom type, it is still a folder having “normal” folder properties.
 another folder type
 
 
The FolderID property is especially important for folder extension type of folders because it is needed to link a folder to actions created for that folder type, and for linking entities that will go inside that folder. For example, the screenshot below shows a Folder Actions and Configuration folder that is for a Health Insurance Policy folder extension. The Health Insurance Policy is a folder that has properties like policy holder name, date active, policy amount, etc. Those are details that define the folder. The way that the action flows in this Folder Actions and Configuration folder (for example, Create Claim, or Deactivate Policy), know about the specific Health Insurance Policy’s information is by FolderID.
folder's screen
 
 
 
When an action flow is created in this Folder Actions and Configuration folder, the information to identify the folder extension is made available automatically as input in the flow. The steps that will interact with that folder extension will need to use the FolderID and folder information in order to perform the manipulation on that specific folder from which the action is being requested. The mapping of FolderId is required (and FolderId can never be null.) Here is how the mapping works to attach the action to a specific vehicle:
 map folder id
 
 
And here is an example of what the folder (Honda Civic) and its action (Edit Car) look like to an end-user:
  

action added 

 
 
 
The car information for Honda Civic is handed in to the Edit Car flow so the flow knows which vehicle to edit, all off of the FolderID property. 
 

About EntityID

An “entity” in the portal can refer to just about any object in the portal. A user, a form, a folder, a custom folder, a chat message – all of these are considered “entities.” An EntityID is used to uniquely identify the entity. The Flow Designer includes components for interacting with Portal entities, under the Integration category:

entity framework

 

 For example, this flow uses the Update Entity step to set up Portal settings.

 updateEntity

In addition to the entity components shown above, when you create a folder extension custom data structure or a folder entity structure, a suite of components can be generated and used to get the respective entity as well:
 folderExtension
 

The Portal offers a custom data structure that allows for creation of entities called Folder Entities, which are custom-defined by a user to represent a specific object and typically stored inside a folder. EntityID is an important attribute of these types of entities. The screenshot below shows a 2009 Chrysler LeBaron folder entity saved to a folder. It is possible to retrieve this entity’s ID using the same Manage menu option:

 entityID

 
 
In cases where the entity is a folder, the FolderID property and the EntityID property will be the same.
 
The EntityID property is especially important for folder entities because it is needed to link an entity to actions created for that entity type. For example, the screenshot below shows an Entity Actions and Configuration folder that is for a Designer Folder folder extension. The Designer Folder  is an entity that has properties like vehicle. Those are details that define the entity. The way that the action flows in this Entity Actions and Configuration folder (for example, Change Seat Position), know about the specific entity is by EntityID.
 
 
VehPassConf 

When an action flow is created in this Entity Actions and Configuration folder, the information to identify the entity is made available automatically as input in the flow. The steps that will interact with that entity will need to use the EntityID in order to perform the manipulation on that specific entity from which the action is being requested. The screenshot below shows the Edit Vehicle (entity) step mapping, and because an array of ExtensionData can be edited, the edit step is performing an update on an individual entity called Data that is of type Vehicle:

 editEntityMapping

 
 
And here is an example of what the entity (2009 Chrysler LeBaron) and its action (Edit Car) look like to an end-user:

 actionToEndUsser

 

 Example of ID relationships

 last

 
 
Cars – Parent folder to 2009 Chrysler LeBaron a folder. This is just a standard root folder.  
  • Entity ID = ABC-123
  • Entity Name = Cars
  • Folder ID = ABC-123
  • Entity Folder ID = parent folder’s ID, N/a
  • ParentFolder ID = N/a
 
2009 Chrysler LeBaron – Folder extension of type “Car” that contains car passengers. Folder extensions are folders that have the properties of a “normal” folder but also have custom properties; in this example, “make,” “model,” “year,” and “color.”
  • Entity ID = JKL-123 (only specify this value when creating a new Car if you want to make a duplicate of another Car)
  • Entity Name = 2009 Chrysler LeBaron
  • Folder ID = JKL-123
  • Entity Folder ID = ABC-123, (parent folder’s ID)
  • Parent Folder ID = ABC-123
  • Extension ID = The extension ID of the type of entity; only specify if you are changing the type of the entity (i.e. when creating a “Car,” if you are changing its type to folder extension of “Bus”)
  • Entity Type Name = The extension type of the entity; only specify if you are changing the type of the entity (i.e. when creating a “Car,” if you are changing its type to folder extension of “Bus”)
When a new Car is created in a flow, its output is its Folder ID.
 
Car Passenger – Folder entity.
folder entities know where they “live” in the portal by their entity folder ID property. The structure of the entities is actually stored in the database.
 
Folder entities have an entity ID to uniquely identify the entity itself, and they have an entity folder ID, which identifies the folder in which the entity is found.
  • Entity ID = LMN-789 (only specify this value when creating a new Car Passenger if you want to make a duplicate of another Car Passenger)
  • Entity Name = Anthony Young
  • Folder ID = JKL-123 
  • Entity Folder ID = JKL-123 (parent folder’s ID)
  • Parent Folder ID = JKL-123
When a new Car Passenger is created in a flow, its output is its Entity ID.
 

Additional Resources