# Create a Custom App

### Prerequisites:

The following shows the general steps/activities that will be carried out in setting up this integration. **Note:** It is advisable to use same E-Mail for signup across the 3 channels below. Step 1 -3 below are compulsory.

1. [Sign up for PostgreSQL](/ixhc/connections/postgres-integration.md) (Part of pre-requisites)
2. [Sign up for iX Hello platform](https://bots.ixhhello.com) (Part of pre-requisites)
3. [Create a custom app in iX Hello.](/ixhc/general/ix-hello-studio-mode.md)
4. Publish the app
5. Test the Amazon Lex app.

### Let's Create a Custom App:

1. Fill following details in the Add Custom window and click ‘Save’.
   1. **Name:** Postgres Assistant
   2. **Custom Skill Type:** Search
   3. Set this app as the Gen AI-App&#x20;
   4. Click Save

<figure><img src="/files/B6HH5eHMrsVHY7uokHkN" alt="" width="563"><figcaption></figcaption></figure>

#### Create Data Source:

In the top menu tabs, select “Data Sources” then “Create New Data Source”. Provide the following details:

#### DataSource 1: Gen AI&#x20;

Name: GenAIPostgres-DS

Integration Configuration: Gen AI

Click: Save

<figure><img src="/files/iMvcTybrniBCsC4pphve" alt="" width="563"><figcaption></figcaption></figure>

#### DataSource 2: PostgreSQL

Name: PostgresDB-DS

Integration Configuration: PostgreSQLIntegration

Click: Save

<figure><img src="/files/T0rcYgPK62sSAIHE4BZs" alt="" width="563"><figcaption></figcaption></figure>

## Create Methods to fetch the data from Postgres

1. Next step is to create Methods. Methods allows you to fetch data from Postgres. The Postgres supported custom queries can be used to define the data to be fetched from the linked Postgres account.
2. iX Hello platform currently supports following Postgres methods:
   1. getallrecords
   2. RunSelectQuery
   3. Getitem
   4. addRecordWithoutPrimaryKey
   5. addRecordMethod
   6. updateRecordMethod
   7. DeleteRecord

The Sample Data uploaded in the client side - PostgreSQL Workbench

<figure><img src="/files/0xDaBgsfC6llpFbvRWcT" alt="" width="563"><figcaption></figcaption></figure>

### Method 1: getallrecordsMethod

This method requires three parameters. Please review the information below.

**Parameters:**

| TableName | public.AppBooking |
| --------- | ----------------- |

Other than these parameters, provide following standard inputs:

| Method Name                                                 | You can give any name. This name will be displayed in the methods list. **getallrecordsMethod**                                                                                                                                                                                                                    |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Request Type                                                | <p><strong>GetAllItems</strong></p><p>This is the method that you are using</p>                                                                                                                                                                                                                                    |
| Parameters                                                  | As explained in the previous table                                                                                                                                                                                                                                                                                 |
| Result Type                                                 | <p>ListofRecords (Auto Selected)</p><p>It indicates that the method can return one or more records</p>                                                                                                                                                                                                             |
| Record Limit                                                | 10                                                                                                                                                                                                                                                                                                                 |
| Record JsonPath                                             | <p>Each method returns data in Json format and to pick any specific information from the json, we need to specify the <em>Record JsonPath</em> so iX Hello platform will pick that data in consideration while displaying results.</p><p>Example: $.\[\*]</p><p>This selects all the records that is returned.</p> |
| Record Template <i class="fa-info-circle">:info-circle:</i> | UserName:{{username}}, AppointmentTime:{{appointmnetTime}}, BookingID:{{bookingID}}, BookingStatus:{{bookingStatus}}, AppointmentDate:{{appointmentDate}}                                                                                                                                                          |
| Empty Result Template                                       | How else can I help you?                                                                                                                                                                                                                                                                                           |
| Valid Result Template                                       | {{Records}}                                                                                                                                                                                                                                                                                                        |

<figure><img src="/files/Wy0qZEyeFv5bIZJaqjaJ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/NeG3j7KBoHNhUwGThE5q" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/XpA70K3UsMMtHZG2SNK9" alt=""><figcaption></figcaption></figure>

#### Sample Response:

<figure><img src="/files/oJBPPVIDLeCAvzBm1Avy" alt=""><figcaption></figcaption></figure>

### Method 2: updateRecordMethod

This method requires three parameters. Please review the information below.

#### Parameters:

| TableName                                                                                                                      | public.AppBooking                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| PrimaryKeyName                                                                                                                 | {{PrimaryKeyName}} - Column name of the primary key, enter the exact postgreSQL column name as stored in the table. |
| PrimaryKeyValue                                                                                                                | {{PrimaryKeyValue}} - Actual Value for the primary key.                                                             |
| ItemData                                                                                                                       | <p>Data in json format example : {"name":"John"} or {"Name":"John"}</p><p>{                                         |
| <br>"appointmentDate": "{{appointmentDate}}",                                                                                  |                                                                                                                     |
| <br>"appointmenTime": "{{appointmenTime}}",                                                                                    |                                                                                                                     |
| <br>"bookingStatus": "{{bookingStatus}}"                                                                                       |                                                                                                                     |
| <br>}                                                                                                                     </p> |                                                                                                                     |

Other than these parameters, provide following standard inputs:

| Method Name           | You can give any name. This name will be displayed in the methods list. updateRecordMethod                                                                                                                                                                                                                   |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Request Type          | <p><strong>PutItems</strong></p><p>This is the method that you are using</p>                                                                                                                                                                                                                                 |
| Parameters            | As explained in the previous table                                                                                                                                                                                                                                                                           |
| Result Type           | <p>Records (Auto Selected)</p><p>It indicates that the method can return one or more records</p>                                                                                                                                                                                                             |
| Record JsonPath       | <p>Each method returns data in Json format and to pick any specific information from the json, we need to specify the <em>Record JsonPath</em> so iX Hello platform will pick that data in consideration while displaying results.</p><p>Example: $</p><p>This selects all the records that is returned.</p> |
| Empty Result Template | Sorry... No Data found                                                                                                                                                                                                                                                                                       |
| Valid Result Template | PrimaryKeyName:{{PrimaryKeyName}},PrimaryKeyValue:{{PrimaryKeyValue}}, Appointment Date:{{appointmentDate}}, Appointmen Time:{{appointmenTime}}, Booking Status:{{bookingStatus}}                                                                                                                            |

<figure><img src="/files/A5FEhAo5AgSpRM4amwSe" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/6Y0JcCDE6jwBEmJDbE2d" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/xYCJVyXgYbohV0B7TO9k" alt=""><figcaption></figcaption></figure>

#### Sample Response:

<figure><img src="/files/CR8MxraiydiWgIqk7LOk" alt=""><figcaption></figcaption></figure>

### Method 3: DeleteRecordMethod

This method requires three parameters. Please review the information below.

#### Parameters:

| TableName       | public.AppBooking                                                                                                   |
| --------------- | ------------------------------------------------------------------------------------------------------------------- |
| PrimaryKeyName  | {{PrimaryKeyName}} - Column name of the primary key, enter the exact postgreSQL column name as stored in the table. |
| PrimaryKeyValue | {{PrimaryKeyValue}} - Actual Value for the primary key.                                                             |

Other than these parameters, provide following standard inputs:

| Method Name           | You can give any name. This name will be displayed in the methods list. **DeleteRecordMethod**                                                                                                                                                                                                               |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Request Type          | <p><strong>DeleteItems</strong></p><p>This is the method that you are using</p>                                                                                                                                                                                                                              |
| Parameters            | As explained in the previous table                                                                                                                                                                                                                                                                           |
| Result Type           | <p>Records (Auto Selected)</p><p>It indicates that the method can return one or more records</p>                                                                                                                                                                                                             |
| Record JsonPath       | <p>Each method returns data in Json format and to pick any specific information from the json, we need to specify the <em>Record JsonPath</em> so iX Hello platform will pick that data in consideration while displaying results.</p><p>Example: $</p><p>This selects all the records that is returned.</p> |
| Empty Result Template | Sorry... No Record Deleted                                                                                                                                                                                                                                                                                   |
| Valid Result Template | This User is Deleted: PrimarykeyName:{{PrimaryKeyName}}, PrimaryKeyValue:{{PrimarykeyValue}}                                                                                                                                                                                                                 |

<figure><img src="/files/igZNGca0GjhJbyMwDnZm" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/vTXtz0e8BXLqkujh2sxu" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3osf1dwd3vgP0j83nPnF" alt=""><figcaption></figcaption></figure>

#### Sample Response:

<figure><img src="/files/vRb9iqSNTty9JDtZEEwp" alt=""><figcaption></figcaption></figure>

### Method 4: GetitemMethod

This method requires three parameters. Please review the information below.

#### Parameters:

| TableName       | public.AppBooking    |
| --------------- | -------------------- |
| QueryParameters | {"userName": "John"} |

Other than these parameters, provide following standard inputs:

| Method Name           | <p>You can give any name. This name will be displayed in the methods list. </p><p><strong>GetitemMethod</strong></p>                                                                                                                                                                                               |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Request Type          | <p><strong>GetItems</strong></p><p>This is the method that you are using</p>                                                                                                                                                                                                                                       |
| Parameters            | As explained in the previous table                                                                                                                                                                                                                                                                                 |
| Result Type           | <p>ListofRecords (Auto Selected)</p><p>It indicates that the method can return one or more records</p>                                                                                                                                                                                                             |
| Record Limit          | 10                                                                                                                                                                                                                                                                                                                 |
| Record JsonPath       | <p>Each method returns data in Json format and to pick any specific information from the json, we need to specify the <em>Record JsonPath</em> so iX Hello platform will pick that data in consideration while displaying results.</p><p>Example: $.\[\*]</p><p>This selects all the records that is returned.</p> |
| Empty Result Template | How else can I help you?                                                                                                                                                                                                                                                                                           |
| Valid Result Template | UserName:{{username}}, AppointmentTime:{{appointmnetTime}}, BookingID:{{bookingID}}, BookingStatus:{{bookingStatus}}, AppointmentDate:{{appointmentDate}}                                                                                                                                                          |

<figure><img src="/files/Tjhk2jTSeaucgxCqihTW" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/QVuV01IxW5MsS5fzOIc6" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/sQcH4GAN34EvVIh7pICT" alt=""><figcaption></figcaption></figure>

#### Sample Response:

<figure><img src="/files/YXI2mSRYpJtHt1sLc55N" alt=""><figcaption></figcaption></figure>

### Method 5: addRecordWithoutPrimaryKey

This method requires three parameters. Please review the information below.

#### Parameters:

| TableName | public.AppBooking                                                                                                                               |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| ItemData  | {"userName":"{{userName}}","appointmentDate":"{{appointmentDate}}", "appointmenTime":"{{appointmenTime}}", "bookingStatus":"{{bookingStatus}}"} |

Other than these parameters, provide following standard inputs:

| Method Name           | <p>You can give any name. This name will be displayed in the methods list. </p><p><strong>addRecordWithoutPrimaryKey</strong></p>                                                                                                                                                                            |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Request Type          | <p><strong>PostItemWithoutPrimaryKey</strong></p><p>This is the method that you are using</p>                                                                                                                                                                                                                |
| Parameters            | As explained in the previous table                                                                                                                                                                                                                                                                           |
| Result Type           | <p>Records (Auto Selected)</p><p>It indicates that the method can return one or more records</p>                                                                                                                                                                                                             |
| Record JsonPath       | <p>Each method returns data in Json format and to pick any specific information from the json, we need to specify the <em>Record JsonPath</em> so iX Hello platform will pick that data in consideration while displaying results.</p><p>Example: $</p><p>This selects all the records that is returned.</p> |
| Empty Result Template | Sorry... No Data found                                                                                                                                                                                                                                                                                       |
| Valid Result Template | userName:{{userName}}, Appointment Date:{{appointmentDate}}, AppointmenTime:{{appointmenTime}}, Booking Status:{{bookingStatus}}                                                                                                                                                                             |

<figure><img src="/files/CjYfGeOHdjDJiiO5vLty" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CwetnhyK9LnIRL0VOL4b" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/rnR14EuZQGcaMrfWsIHt" alt=""><figcaption></figcaption></figure>

#### Sample Response:

<figure><img src="/files/jbeHUdfYmKElodJLM59z" alt="" width="563"><figcaption></figcaption></figure>

### Method 6: addRecordMethod

This method requires three parameters. Please review the information below.

#### Parameters:

| TableName                                                                                                                      | public.AppBooking                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| PrimaryKeyName                                                                                                                 | {{PrimaryKeyName}} - Column name of the primary key, enter the exact postgreSQL column name as stored in the table. |
| PrimaryKeyValue                                                                                                                | {{PrimaryKeyValue}} - Actual Value for the primary key.                                                             |
| ItemData                                                                                                                       | <p>Data in json format example : {"name":"John"} or {"Name":"John"}</p><p>{                                         |
| <br>"appointmentDate": "{{appointmentDate}}",                                                                                  |                                                                                                                     |
| <br>"appointmenTime": "{{appointmenTime}}",                                                                                    |                                                                                                                     |
| <br>"bookingStatus": "{{bookingStatus}}"                                                                                       |                                                                                                                     |
| <br>}                                                                                                                     </p> |                                                                                                                     |

Other than these parameters, provide following standard inputs:

| Method Name           | You can give any name. This name will be displayed in the methods list. addRecordMethod                                                                                                                                                                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Request Type          | <p><strong>PosttItems</strong></p><p>This is the method that you are using</p>                                                                                                                                                                                                                               |
| Parameters            | As explained in the previous table                                                                                                                                                                                                                                                                           |
| Result Type           | <p>Records (Auto Selected)</p><p>It indicates that the method can return one or more records</p>                                                                                                                                                                                                             |
| Record JsonPath       | <p>Each method returns data in Json format and to pick any specific information from the json, we need to specify the <em>Record JsonPath</em> so iX Hello platform will pick that data in consideration while displaying results.</p><p>Example: $</p><p>This selects all the records that is returned.</p> |
| Empty Result Template | Sorry... No Data found                                                                                                                                                                                                                                                                                       |
| Valid Result Template | PrimarykeyName:{{userName}}, PrimarykeyValue:{{PrimarykeyValue}},Appointment Date:{{appointmentDate}}, Appointmen Time:{{appointmenTime}}, Booking Status:{{bookingStatus}}                                                                                                                                  |

<figure><img src="/files/4QWAbKx2eA9ePw5Rdibm" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/J6wvfL210J3bpcbbSBQE" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/souKpBh2tbkrkhr7BEwk" alt=""><figcaption></figcaption></figure>

#### Sample Response:

<figure><img src="/files/DBZVcJNML9CKzajvQr74" alt=""><figcaption></figcaption></figure>

### Method 7: RunSelectQueryMethod

This method requires one parameter. Please review the information below.

#### Parameters:

| SelectStatement | {{SelectStatement}} |
| --------------- | ------------------- |

Other than these parameters, provide following standard inputs:

| Method Name           | You can give any name. This name will be displayed in the methods list. **RunSelectQueryMethod**                                                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Request Type          | <p>RunSelectQuery</p><p>This is the method that you are using</p>                                                                                                                                                                                                                                            |
| Parameters            | As explained in the previous table                                                                                                                                                                                                                                                                           |
| Result Type           | <p>ListofRecords (Auto Selected)</p><p>It indicates that the method can return one or more records</p>                                                                                                                                                                                                       |
| Record Limit          | 15                                                                                                                                                                                                                                                                                                           |
| Record JsonPath       | <p>Each method returns data in Json format and to pick any specific information from the json, we need to specify the <em>Record JsonPath</em> so iX Hello platform will pick that data in consideration while displaying results.</p><p>Example: $</p><p>This selects all the records that is returned.</p> |
| Empty Result Template | Sorry... No Data found                                                                                                                                                                                                                                                                                       |
| Record Template       | User Name:{{userName}}, Appointment Date:{{appointmentDate}}, Appointmen Time:{{appointmenTime}},BookingID : {{bookingId}}, Booking Status:{{bookingStatus}}                                                                                                                                                 |
| Valid Result Template | <code class="expression">Records</code>                                                                                                                                                                                                                                                                      |
|                       |                                                                                                                                                                                                                                                                                                              |

<figure><img src="/files/NJTecIGd3R8dpdWcZn3x" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/OP4Hjbi9XlFpTzPaBNyq" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qaIscbVmMstk4tx1SH1Q" alt=""><figcaption></figcaption></figure>

#### Sample Response:&#x20;

<figure><img src="/files/VupF9sjunSS0ZEjZsYqZ" alt=""><figcaption></figcaption></figure>

### Method 8: Gen AI

* Name: Chat Completion RAG
* Request Type: chatcompletion-rag
* Parameters
  * Model: Select your preferred Generative AI model (e.g., Azure gpt-4o).
  * System Message: Provide instructions for the bot’s behavior:
  * *This is a sample prompt/system message, this can be configured as per the use case need.*

{% code overflow="wrap" %}

```
I am a concise and focused assistant, providing accurate information based solely on the provided Zendesk integrated methods. I aim to deliver clear and relevant answers to your queries from the Zendesk integrated methods.
```

{% endcode %}

* UserQuestion: {{UserInput}}
* Streaming: False
* SessionTime: 10
* OrganizationID: {{Context.OrganizationID}}
* EmployeeID: {{Context.OrganizationID}}

<figure><img src="/files/lujOwpdbeIlY9Xxm3XPh" alt=""><figcaption></figcaption></figure>

Configure Method Output:

* Result Type: ListofRecords
* Record Limit: 10

<figure><img src="/files/9oxIISVRpGHbpyKYxKhY" alt=""><figcaption></figcaption></figure>

* Configure Method Result:
  * Record JsonPath: $.choices\[0].message
  * Valid Result Template: {{Records}}&#x20;
  * Record Template: {{content}}
  * Empty Result Template: "Is there anything else I can assist you with?"
* Uncheck: Automatically prompt for next question
* Save & Test
  * Click Save & Test. This will initiate a test API call.

<figure><img src="/files/BnxNizOQegcgZecfJFEn" alt=""><figcaption></figcaption></figure>

#### Sample Response

<figure><img src="/files/9CsBB6Oh9m6B5Wls6ZS8" alt=""><figcaption></figcaption></figure>

#### Create New Intent <a href="#create-new-intent" id="create-new-intent"></a>

1. Click Create New Intent.
2. Enter Intent Details as Follows:

| Name                       | addRecordIntent               |
| -------------------------- | ----------------------------- |
| Intent Type                | Search                        |
| Intent Action              | Execute Method                |
| Data Source                | PostgresDB-DS                 |
| Data Source Method         | addRecordMethod               |
| Dialog Delegation Strategy | Fallback To Skill             |
| Action                     | Save the intent configuration |

<figure><img src="/files/bxQoxruzxt3rxTYaJ6Y6" alt="" width="563"><figcaption></figcaption></figure>

#### Similarly Create the Intents for rest of the Methods created:

* getallrecords - getallrecordsIntent
* RunSelectQuery - RunSelectQueryIntent
* Getitem - GetitemIntent
* addRecordWithoutPrimaryKey - addRecordWithoutPrimaryKeyIntent
* addRecordMethod - addRecordMethodIntent
* updateRecordMethod - updateRecordMethodIntent
* DeleteRecord - DeleteRecordIntent
* GenAIZendeskAssist-DS - ChatIntent

### Slot Creation

Slot Creation Steps for Generative AI and Postgres

#### Slot: addRecordIntent

Parameter 1: PrimaryKeyValue

Parameter 2 : appointmentDate

Parameter 3: appointmenTime

Parameter 4: bookingStatus

| Name                         | PrimaryKeyValue                                          | appointmentDate                                          | appointmenTime                                           | bookingStatus                                            |
| ---------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| Description                  | PrimaryKeyValue                                          | appointmentDate                                          | appointmenTime                                           | bookingStatus                                            |
| Slot Order (Sequence Number) | 1                                                        | 2                                                        | 3                                                        | 4                                                        |
| Reprompt Message             | Please provide any Name                                  | Please provide Appointment Date (yyyy-mm-dd)             | Please provide Appointmen Time (hh:mm)                   | Please provide booking status                            |
| Type                         | Text                                                     | Date                                                     | Text                                                     | Text                                                     |
| Custom App                   | Postgres Assistant\_498bd99d-8109-4abe-91cf-f57d7ac4f9ce | Postgres Assistant\_498bd99d-8109-4abe-91cf-f57d7ac4f9ce | Postgres Assistant\_498bd99d-8109-4abe-91cf-f57d7ac4f9ce | Postgres Assistant\_498bd99d-8109-4abe-91cf-f57d7ac4f9ce |
| Intent                       | addRecordIntent                                          | addRecordIntent                                          | addRecordIntent                                          | addRecordIntent                                          |
| Enable                       | Is Required                                              | Is Required                                              | Is Required                                              | Is Required                                              |
| Action                       | Save the intent configuration                            | Save the intent configuration                            | Save the intent configuration                            | Save the intent configuration                            |

<figure><img src="/files/ll49E9NpDNo6aKovpP7C" alt=""><figcaption></figcaption></figure>

**Create rest of the slots as per the parameters suggested.**

### Utterance

1. Navigate to Utterances
2. In your Custom App, go to the Utterances tab.

Create New Utterance: Enter Intent Details as Follows:

<table data-header-hidden><thead><tr><th>Parameter</th><th>Info</th><th>Info</th><th width="160">Info</th><th>Info</th><th>Info</th><th>Info</th></tr></thead><tbody><tr><td>Intent</td><td>addRecordIntent</td><td>AddRecord withoutprimarykey</td><td>ChatIntent</td><td>DeleteRecord</td><td>RunSelectQuery</td><td>updateRecordIntent</td></tr><tr><td>Value</td><td>add the record</td><td>add the record without primarykey</td><td>Ask a question</td><td>Delete the record</td><td>Run the sql query</td><td>update the record</td></tr><tr><td>Custom App</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td></tr><tr><td>Intent</td><td>addRecordIntent</td><td>getAllTicketsDetailsIntent</td><td>getClosedStatusTicketsIntent</td><td>getOpenStatusTicketsIntent</td><td>getPendingStatusTicketsIntent</td><td>UpdateTicketIntent</td></tr><tr><td>Action</td><td>Save the intent configuration</td><td>Save the intent configuration</td><td>Save the intent configuration</td><td>Save the intent configuration</td><td>Save the intent configuration</td><td>Save the intent configuration</td></tr></tbody></table>

<figure><img src="/files/B0OycUrkNwgoBWmvlacb" alt=""><figcaption></figcaption></figure>

**Create rest of the Utterances as per the Intents created.**

### Input Configuration

1. For Generative AI Intent

* Navigate to Input Configuration
* In your Custom App, go to the Input Configuration tab.

<table data-header-hidden><thead><tr><th>Parameter</th><th>Info</th><th>Info</th><th width="141">Info</th><th>Info</th><th>Info</th></tr></thead><tbody><tr><td>Name</td><td>ChatInput</td><td>UpdateRecordInput</td><td>Run the SQL Query</td><td>InsertRecordInput</td><td>DeleteRecordInput</td></tr><tr><td>Custom Skill </td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td><td>Postgres Assistant_498bd99d-8109-4abe-91cf-f57d7ac4f9ce</td></tr><tr><td>Custom Intent</td><td>CreateNewTicketIntent</td><td>UpdateRecordIntent</td><td>RunSelectQueryIntent</td><td>addRecordIntent</td><td>DeleteRecordIntent</td></tr><tr><td>Description </td><td>ChatInput</td><td>UpdateRecordInput</td><td>Run the SQL Query</td><td>InsertRecordInput</td><td>DeleteRecordInput</td></tr><tr><td>Data Source </td><td>GenAIPostgres-DS</td><td>PostgresDB-DS</td><td>PostgresDB-DS</td><td>PostgresDB-DS</td><td>PostgresDB-DS</td></tr><tr><td>Data Source Method</td><td>chatCompletionMethod</td><td>UpdateRecordMethod</td><td>RunSelectQueryMethod</td><td>addRecordMethod</td><td>DeleteRecordMethod</td></tr><tr><td>Enable Gen AI Toggle Button</td><td>No</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td></tr><tr><td>Action</td><td>Save the intent configuration</td><td>Save the intent configuration</td><td>Save the intent configuration</td><td>Save the intent configuration</td><td>Save the intent configuration</td></tr></tbody></table>

<figure><img src="/files/Vqc19Wvqo72lulLDR8Ka" alt=""><figcaption></figcaption></figure>

**Create rest of the Inputs as per the Intents and Methods created.**

#### Input Parameter Configuration

These parameters are created if and only if the method parameter exists to each methods created.

**Input Parameter Creation for:** UpdateRecordInput

| Search Parameter Name | bookingStatus                 | PrimaryKeyName                | PrimaryKeyValue               | appointmentDate               | appointmenTime                |
| --------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
| Data Type             | Text                          | Text                          | Text                          | Date                          | Text                          |
| Description           | bookingStatus                 | PrimaryKeyName                | PrimaryKeyName                | appointmentDate               | appointmenTime                |
| Method Parameter      | bookingStatus                 | PrimaryKeyName                | PrimaryKeyName                | appointmentDate               | appointmenTime                |
| Action                | Save the intent configuration | Save the intent configuration | Save the intent configuration | Save the intent configuration | Save the intent configuration |

<figure><img src="/files/cbZI1rJTlaIGNKWDTPjh" alt=""><figcaption></figcaption></figure>

## Test the App

Click on the three dots under "Action." A dropdown menu will appear; select the "Test" option to test the application.

<figure><img src="/files/oYTeNbXmdNEXFDAAyB99" alt=""><figcaption></figcaption></figure>

Click the "Test" option to access the chat widget. Here, you'll see the bot's name and a welcome message, allowing you to start your conversation with the bot.

<figure><img src="/files/kXiBT037EtZC4B8HKyCF" alt="" width="407"><figcaption></figcaption></figure>

Congratulations! You have successfully completed building a custom app using PostgreSQL.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixhello.com/ixhc/connections/postgres-integration/create-a-custom-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
