FAQ
Developer hub
Plugin Input Fields
AI Field

AI Field

The AI Field in viaSocket Plugin Builder enables you to integrate AI-powered capabilities into your app's triggers and actions. By adding this field type, you can allow your users to leverage AI for complex tasks without requiring manual intervention.

How to Use the AI Field

When building a plugin in viaSocket, you can include an AI Field to enhance your app’s automation capabilities. This field type helps automate decision-making, text generation, data extraction, and other AI-supported functions, making integrations smarter and more efficient.

JSON Configuration for AI Field

To add an AI Field to your plugin, use the following JSON structure:

{
    "key": "XfDxOeon",
    "type": "aifield",
    "label": "Sample Label",
    "help": "Enter help text",
    "required": true,
    "prompt": "Write a prompt to define the AI's behavior, task, or role.",
    "suggestionGenerator": " // Enter JS code as the source from which AI will generate results"
}

Explanation of JSON Fields

  • key: A unique identifier for the AI field.

  • type: Specifies the field type as aifield.

  • label: The display name of the field.

  • help: Instructional text to guide users on how to use this field.

  • required: Defines whether this field is mandatory.

  • prompt: Defines the AI's behavior, task, or role in generating responses.

  • suggestionGenerator: Specifies the source of data from which the AI will generate results.

Benefits for SaaS Developers and Plugin Builders

  • Enhanced automation: Leverage AI to automate complex tasks within your app integration.

  • User-friendly experiences: Reduce the need for manual inputs by providing AI-powered suggestions.

  • Customizable AI responses: Define AI behavior through structured prompts and dynamic data inputs.

  • Seamless integration: Improve your app's functionality with AI-driven decision-making and processing.

Use Cases and Examples

Below are some direct JSON examples you can copy and paste into your viaSocket plugin:

1. Smart Email Categorization

{
    "key": "email_category",
    "type": "aifield",
    "label": "Email Category",
    "help": "Classify the email content into Sales, Support, or Feedback.",
    "required": true,
    "prompt": "Classify this email into one of the following categories: Sales, Support, or Feedback.",
    "suggestionGenerator": "return input.email_content;"
}

2. Automated Social Media Caption Generator

{
    "key": "social_caption",
    "type": "aifield",
    "label": "Generate Social Media Caption",
    "help": "Create an engaging caption for social media posts.",
    "required": true,
    "prompt": "Generate a creative Instagram caption for a new product launch.",
    "suggestionGenerator": "return input.product_name + ' ' + input.product_description;"
}

3. Customer Sentiment Analysis

{
    "key": "sentiment_analysis",
    "type": "aifield",
    "label": "Customer Sentiment",
    "help": "Analyze the sentiment of customer feedback.",
    "required": true,
    "prompt": "Analyze the sentiment of this customer review and provide a one-word summary.",
    "suggestionGenerator": "return input.customer_review;"
}

4. Resume Screening in HR Applications

{
    "key": "resume_score",
    "type": "aifield",
    "label": "Resume Screening Score",
    "help": "Evaluate resumes and suggest suitability for a role.",
    "required": true,
    "prompt": "Assess this resume and provide a suitability score (0-100) for the position of Software Engineer.",
    "suggestionGenerator": "return input.resume_text;"
}

5. Automated Data Enrichment

{
    "key": "data_enrichment",
    "type": "aifield",
    "label": "Enrich Lead Data",
    "help": "Fill missing company details based on partial contact information.",
    "required": true,
    "prompt": "Find and fill missing company details (industry, size, location) for this contact.",
    "suggestionGenerator": "return input.company_name;"
}

By integrating the AI Field in your viaSocket plugin, you can enhance your app’s automation capabilities, providing smarter and more powerful workflows for your users.

Prev