Determine Hosting Type (SaaS / On-Prem / PaaS / Not Known / Not Applicable)
Automatically classify an application's hosting model—SaaS, On-Prem, PaaS, Not Known, or Not Applicable—using a structured AI (GPT) Action and persist the result directly to Application Details via the Update App API.
Use this AI Prompt in a Torii Workflow to classify the hosting model of a discovered application based on vendor characteristics.
This guide follows the same pattern as other guides in this section:
- Generate a strict, single output value via an AI (GPT) Action
- Store that value in a single-select custom Application Details field
- Persist it onto the app record via a Custom Action calling Torii’s Update app endpoint
What this prompt determines
The prompt returns exactly one of these values:
-
SaaS
The application is primarily delivered as a cloud-hosted software service. -
On-Prem
The application is primarily installed and hosted within a customer’s own infrastructure. -
PaaS
The vendor provides a platform for building or deploying applications rather than a traditional end-user SaaS product. -
Not Known
There is insufficient reliable information to confidently determine the hosting model. -
Not Applicable
The entity does not map cleanly to SaaS, On-Prem, or PaaS (for example, a hardware vendor, reseller, marketplace listing, or service provider).
Inputs (Torii personalization tokens)
This prompt uses:
- Application name:
[Trigger.App.Name] - Vendor name:
[Trigger.App.Vendor] - Website:
[Trigger.App.Website]
This classification is based strictly on vendor characteristics.
Discovery signals (browser extension, network detection, etc.) are intentionally not used in this guide.
Output field (Application Details)
Create a single-select custom Application Details field (example: Hosting Type) with these exact options:
SaaSOn-PremPaaSNot KnownNot Applicable
When you create the field, Torii assigns it an Internal Name (custom fields typically start with c_).
You will use that internal name in the Update app API request.
Reference (Application Details settings):
https://support.toriihq.com/hc/en-us/articles/32565395389723-Settings-Application-Details
Workflow setup
- Trigger: New application discovered (or any workflow where the subject app is set)
- Action: AI (GPT) Action
- Paste the prompt below
- Add Response mapping to store the model output into a workflow token (example:
Disc-Hosted)
- Action: Custom Action (HTTP Request)
- Call
PUT /apps/{idApp}to update the app record - Set your custom field internal name to the AI output token
- Call
AI (GPT) Actions documentation:
https://support.toriihq.com/hc/en-us/articles/36726298957083-AI-GPT-Actions
Prompt (paste into AI (GPT) Action)
# Prompt: Determine Hosting Type
```text
You are assisting with application governance inside Torii.
Your task:
Determine the hosting model classification for the discovered application.
Input:
You will receive:
- Application name
- Vendor name (if available)
- Vendor website (if available)
Decision Guidelines:
1. If the application is clearly delivered as a cloud-hosted software product accessed via browser or subscription, return:
SaaS
2. If the application is primarily installed and hosted within a customer’s infrastructure or data center, return:
On-Prem
3. If the vendor primarily provides a platform for building, deploying, or hosting applications, return:
PaaS
4. If the entity does not map cleanly to SaaS, On-Prem, or PaaS, return:
Not Applicable
5. If you cannot confidently determine the hosting model, return:
Not Known
Input:
Application: [Trigger.App.Name]
Vendor: [Trigger.App.Vendor]
Website: [Trigger.App.Website]
Output Requirements:
- Return ONLY one of the following exact values:
SaaS
On-Prem
PaaS
Not Known
Not Applicable
- If you are uncertain, return Not Known.
- Do not include JSON.
- Do not include punctuation.
- Do not include explanations.
- Do not include markdown.
- Do not include extra whitespace.
- Output must be exactly one of the allowed values.
```
Response mapping (AI action)
In the AI (GPT) Action, add Response mapping so the output is usable downstream.
Example:
- Name:
Hosted - Value: the model response (single line)
Use the output: Update the app record (Custom Action → Update app endpoint)
This is the end-to-end pattern:
AI output → workflow token → update the app record → populate Application Details field
Step 1 — Identify your custom field internal name
In Settings → Application Details, locate your field (e.g., Hosting Type) and copy its Internal Name.
Example internal name: c_hosting_type
Step 2 — Configure the Custom Action (HTTP Request)
-
Method:
PUT -
URL:
https://api.toriihq.com/v1.0/apps/[Trigger.App.ID] -
Headers:
Content-Type: application/jsonAccept: */*Authorization: Bearer <YOUR_TORII_API_KEY>(recommended: store in Secrets Vault)
-
Body (example):
{
"c_hosting_type": "[AI action.response.Hosted]"
}Replace:
c_hosting_typewith your field internal nameHostedwith the Response mapping token name you used in the AI action
Update app endpoint reference:
https://developers.toriihq.com/reference/putappsidapp
Optional: Enable “Search the web” for vendor research
If you want the AI action to research the vendor’s hosting model in real time, you can enable Search the web in the AI (GPT) Action.
This is recommended when:
- The vendor is lesser known
- Hosting model is ambiguous
- Website information is incomplete
To enable this capability, you must configure your own OpenAI API key:
https://support.toriihq.com/hc/en-us/articles/38227217845531-Managing-AI-Settings
Testing checklist
- Known cloud SaaS product → expect
SaaS - Known on-prem enterprise software → expect
On-Prem - Known developer platform vendor → expect
PaaS - Hardware or service-only vendor → expect
Not Applicable - Obscure vendor with insufficient info → expect
Not Known
This prompt is designed to behave like a workflow contract: deterministic outputs, strict value control, and safe defaults when confidence is low.
Updated about 2 hours ago
Additional GPT Action Examples