> ## Documentation Index
> Fetch the complete documentation index at: https://watermelon.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OVIS template

The OVIS Custom Action connects your Agent to the OVIS knowledge base so it can retrieve posts and information and use it when answering customer questions.

This setup includes:

* A predefined OpenAPI schema for OVIS
* No authentication
* The required OVIS BaseURL
* A health check configuration

After setting up the Action, you can validate it, activate it, and test it in the Playground.

## Set up the action

1. Go to **Actions** in Watermelon.
2. In the **Actions catalog**, click **Custom action**.
3. Click **Create new Action**.
4. Fill in the fields below.

### General details

**Action name**<br />`OVIS`

**Description**<br />`Get posts and information from OVIS database.`

**BaseURL**<br />`https://ovis-kennisbank.nl/wp-json/`

### Authentication

For **Authorization Header**, select **No auth**.

No additional authentication details are required for this template.

### Health check

**Health check URL**<br />`https://www.yourdomain.com/health_check`

Replace this URL with the health check endpoint you want Watermelon to use.

**Instruction**

> You should respond with the following message or a similar variation: Sorry, something went wrong on our end. Can I assist you with anything else? Please let me know how I can help.

### Schema

Paste the OVIS schema into the **Schema** field:

```text theme={null}
openapi: "3.0.0"
info:
  title: "Kennisbank API"
  description: "The API to access all data from the Kennisbank."
  version: "1.0.1"
  contact:
    email: support@schaapontwerpers.nl
servers:
  - url: https://ovis-kennisbank.nl/wp-json
tags:
  - name: posts
    description: All posts from public post types
paths:
  /sdc/v1/posts:
    get:
      tags:
        - posts
      summary: Get all posts
      description: Get all posts from all public post types from this installation
      operationId: getAllPosts
      responses:
        "200":
          description: "Successful response"
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Post"
components:
  schemas:
    Post:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 1
        title:
          type: string
          example: "Marketing en SEO: Het perfecte duo voor online succes"
        post_type:
          type: string
          example: post
        permalink:
          type: string
          format: uri
          example: https://ovis-kennisbank.nl/artikelen/marketing-en-seo-het-perfecte-duo-voor-online-succes/
        published_date:
          type: string
          format: date-time
          example: "2024-04-23T13:10:01+02:00"
        modified_date:
          type: string
          format: date-time
          example: "2024-04-23T13:10:01+02:00"
        author_name:
          type: string
          example: SchaapOntwerpers
        excerpt:
          type: string
          example: Description of a post.
        content:
          type: string
          example: Content of a post.
        featured_image:
          type: string
          format: uri
          example: https://ovis-kennisbank.nl/app/uploads/2024/04/pexels-shvetsa-5324855.jpg
        terms:
          type: array
          items:
            $ref: "#/components/schemas/Term"
    Term:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
```

Click **Validate** to check the schema.

### Example in Watermelon

<Frame>
  <img src="https://mintcdn.com/watermelon/U1o80ZmdmQTd06X6/images/OVIS-action-template.png?fit=max&auto=format&n=U1o80ZmdmQTd06X6&q=85&s=39f956b16387cf2c83159bf346a4c880" alt="OVIS Action Template" width="3838" height="1880" data-path="images/OVIS-action-template.png" />
</Frame>

When everything is configured correctly, click **Save** and then **Activate**.

Finally, test the Action in the **Playground** to make sure your Agent can retrieve the expected information from OVIS.

## Editing an Action Template

After setting up an Action, you can adjust it to your use case. For example, you can add endpoints to the schema, change parameters, or update the name and description.

Be careful when changing authentication settings or existing endpoints, as this can prevent the Action from connecting to the API.

## Troubleshooting

| Issue                                        | Likely cause                            | What to check                                                    |
| :------------------------------------------- | :-------------------------------------- | :--------------------------------------------------------------- |
| **Validation failed**                        | Invalid OpenAPI schema                  | Check the schema for missing or unsupported fields.              |
| **401 Unauthorized**                         | Incorrect credentials                   | Check whether the endpoint unexpectedly requires authentication. |
| **404 Not Found**                            | Incorrect endpoint                      | Check the BaseURL and endpoint path.                             |
| **Action does not return the expected data** | Schema or parameter mismatch            | Check the endpoint parameters and API response structure.        |
| **Health check fails**                       | Health check endpoint cannot be reached | Check the Health check URL and endpoint availability.            |
