Create a Table

Next, let’s create a table in the Data Store. This table is used to store the Refresh Token and userID values, which are retrieved whenever an Access Token needs to be generated.

To create a table:

  1. Navigate to the Catalyst Cloud Scale service section in the console and click Start Exploring. catalyst_tutorials_leadmanager_appsail_start_explore_cloud_scale

  2. Click Create a new Table. catalyst_tutorials_lkeadmanager_appsail_create_table

  3. Enter the table’s name as “Token” and click Create. catalyst_tutorials_leadmanager_appsail_table_nme

Note: Ensure that you enter the name exactly as instructed because the application's code contains the same name.

The table will be created.

catalyst_tutorials_leadmnager_appsail_table_created

Now, let’s create two columns in the table to store the userID and the refresh token respectively.

Info: You can learn about the various data types supported by Catalyst and the other properties of a column from the Data Store help documentation.
  1. Click New Column in the Schema View section. catalyst_tutorials_leadmanager_appsail_new_clm

  2. Enter the column’s name as “refresh_token”. Select the data type as Encrypted Text. catalyst_tutorials_leadmanager_appsail_clm_name

  3. Click Create. catalyst_tutorials_leadmanager_appsail_clm_1_created

  4. Now click the New Column button again to create the second column. Name it “userId”, and select BigInt as its data type. catalyst_tutorials_leadmanager_appsail_clm_2

  5. Click Create. catalyst_tutorials_leadmanager_appsail_clms_created

The required columns have been created.

Configure Scopes and Permissions

To allow any user of the Lead Manager application to view or manage leads from the client application, you must enable an additional table permission that will allow the user to fetch and store new Refresh Tokens, if needed.

To enable the required permissions:

  1. Click the Scopes and Permissions tab. catalyst_tutorials_leadmanager_appsail_tables_permissions

  2. Enable the Insert permission for the App User role under the Table Permissions section. Ensure you do not change any other permission setting. catalyst_tutorials_leadmanager_appsail_permission_aet

The Data Store component is now configured for the application.

Last Updated 2025-01-31 19:19:27 +0530 +0530

RELATED LINKS

Data Store ZCQL