Skip to Content

How to create a session table in Jitterbit App Builder

Introduction

All interactions with App Builder occur within the context of a web "session". A session is created when a user first visits App Builder. Subsequent requests from the same user are associated with the same session. This page shows you how to create a session table and associate it with a rule and an event.

Business use cases for sessions

The following are some of the ways in which sessions can be used:

  • Track and distinguish between authenticated users under the same account. For example, if two people are both signed in as an admin user, sessions allow you to track them individually.

  • Track multiple anonymous users.

  • Filter report criteria based on session.

Create a session table

You can create a session table from the data storage layer of your application:

  1. Navigate to the App Workbench.

  2. In the Quick Actions panel, click + Table.

  3. Give the new table the name Session, and click Save.

  4. Verify that a column with the name SessionID and the data type UUID was created and that it was designated as the primary key. (This should happen automatically.)

  5. Under the Table panel, click More > Edge Case to see advanced options.

  6. Under the Managed Settings section, use the Purpose dropdown to select Managed Table. Another dropdown, Managed Type, becomes visible. Click it and select Session.

  7. Add additional columns needed for your session.

  8. Click Enhance Table, then Proceed.

Next, you must create a custom event referencing an intrinsic App Builder event that runs when querying the table via the application UI. To do that, follow these steps:

  1. Navigate to the App Workbench > Rules.

  2. Under App Data Sources, select By Table. In the Tables panel, look in the list of tables to find the Session table you've created previously.

  3. On the row of the Session table, click the icon under the Events column. The Data Storage Events dialog opens.

  4. Click + Table Event. The Event page opens.

  5. Give the new event the name "Filter" and click Save. An edit page opens.

  6. Under the Actions panel, click Register. An Action dialog opens.

  7. In the Type dropdown, select Plugin.

  8. In the Plugin dropdown, select Create row on empty table. This plugin creates a new row if the Filter event returns no rows.

  9. (Optional) Enter a description of the event in the Technical Help field.

  10. Click the Save button.