CRMconnect Azuvio · Docs

Workflow: ArvisAI — AI Assistant & Audio Transcription

Modules involved: ArvisAI (Chat · Image Generator · Audio Transcription · Audio Translation · Template Engine) · Tickets
Used by: Any staff with activated access · Support (ticket auto-reply)
AI provider: OpenAI exclusively (GPT, DALL-E, Whisper)

Overview

ArvisAI is an AI tools hub based exclusively on OpenAI. It provides 5 distinct functionalities accessible from the sidebar, plus a single automated CRM integration: automatic reply on ticket opening.

The 5 tools:

Tool OpenAI model Purpose
Chat GPT (configurable) Free AI conversation per staff member
Image Generator DALL-E 2 / DALL-E 3 Generate images from text
Audio Transcription Whisper-1 Upload audio → text (same language)
Audio Translation Whisper-1 Upload audio → text in English
Template Engine GPT (configurable) Generate text from templates with variables

Data is private per user. All histories (chat, images, transcriptions, documents) are filtered by user_id = current_staff. There is no cross-user visibility and no link to CRM records (lead, client, project) — except for the automatic ticket reply.

Transcription and translation: file upload only. There is no real-time recording or URL input. Accepted formats: .mp3, .m4a. Configurable size limit (arvisai_audio_transcription_max_size).


Flow diagram

[SETUP — admin, one time]
  │
  ├── ArvisAI → Settings (admin only):
  │     ├── arvisai_openai_secret_key (OpenAI API key)
  │     ├── Chat model: GPT-3.5-turbo / GPT-4 / GPT-4o / GPT-5, etc.
  │     ├── Image model: default / DALL-E-2 / DALL-E-3
  │     ├── arvisai_audio_transcription_max_size (bytes, default ~100KB)
  │     ├── arvisai_audio_transcription_allowed_extensions (.mp3,.m4a)
  │     └── Auto ticket reply: arvisai_ai_autoreply_on_opening_ticket (0/1)
  │           arvisai_ai_reply_agent_name · agent_title · agent_staff_id
  │
  ↓
════════════════════════════════════
TOOL 1: CHAT
════════════════════════════════════
  │
  ├── ArvisAI → Chat → type your message
  ├── POST /v1/chat/completions (streaming)
  ├── Response stored in arvisai_chat: human_message + ai_response
  └── History visible only to current staff (filtered on user_id)
  │
════════════════════════════════════
TOOL 2: IMAGE GENERATOR
════════════════════════════════════
  │
  ├── ArvisAI → Image Generator → describe the image
  ├── POST /v1/images/generations (DALL-E)
  ├── Image downloaded from OpenAI URL → saved locally
  │     (modules/arvisai/uploads/generated_images/{id}/)
  └── Stored in arvisai_images (user_id + local image_url)
  │
════════════════════════════════════
TOOL 3: AUDIO TRANSCRIPTION
════════════════════════════════════
  │
  ├── ArvisAI → Audio Transcription → Upload file (.mp3/.m4a)
  ├── Check: allowed extension + size ≤ configured limit
  ├── File saved locally: uploads/audio_transcription/{id}/
  ├── POST /v1/audio/transcriptions (Whisper-1)
  │     → output: text in THE SAME language as the original audio
  └── Stored in arvisai_audio_transcription: audio_file_path + transcription_text
  │
════════════════════════════════════
TOOL 4: AUDIO TRANSLATION
════════════════════════════════════
  │
  ├── ArvisAI → Audio Translation → Upload file (.mp3/.m4a)
  ├── POST /v1/audio/translations (Whisper-1)
  │     → output: ALWAYS in English, regardless of source language
  └── Stored in arvisai_translated_audio: audio_file_path + translated_text
  │
════════════════════════════════════
TOOL 5: TEMPLATE ENGINE
════════════════════════════════════
  │
  ├── ArvisAI → Templates → select template
  ├── Template has variable fields ({{variable_name}}) defined in custom_inputs JSON
  ├── Fill in the fields + choose Tone of Voice + Language
  ├── POST /v1/chat/completions with prompt = custom_prompt + variable values + tone + language
  ├── Output appears in TinyMCE editor
  └── Optional: Save as Document → arvisai_documents (document_name + HTML content)
  │
════════════════════════════════════
CRM INTEGRATION: AUTO REPLY TICKETS
════════════════════════════════════
  │
  ├── Condition: arvisai_ai_autoreply_on_opening_ticket = 1
  ├── Hook: ticket_created → arvisai_ticket_created_automated_reply()
  ├── Additional condition: ticket.admin IS NOT NULL (ticket must have assigned staff)
  ├── Prompt built: "I work as a {agent_title} and my name is {agent_name}...
  │     Write ticket reply about '{ticket_message}'... reply on the same language..."
  ├── POST /v1/chat/completions
  └── Response added as reply on ticket, attributed to arvisai_ai_reply_agent_staff_id
        adminread = 0 (marked as unread)

[AI USED ✓ · TICKET AUTO-REPLIED ✓]

Step by step

1. Setup (admin)

Where: /admin/arvisai → Settings (requires is_admin())

Required configuration:

Option Description
arvisai_openai_secret_key API Key from OpenAI Platform (platform.openai.com)

Optional configuration:

Option Default value Description
Chat model GPT-3.5-turbo Model used for chat and template generation
Image model default (DALL-E-2) default, dall-e-2, dall-e-3
arvisai_audio_transcription_max_size ~100KB Audio upload limit (bytes)
arvisai_audio_transcription_allowed_extensions .mp3,.m4a Accepted extensions

Auto ticket reply configuration:

Option Description
arvisai_ai_autoreply_on_opening_ticket 1 = enabled · 0 = disabled (default)
arvisai_ai_reply_agent_name AI agent name in the reply (default: "Alex")
arvisai_ai_reply_agent_title Agent title (default: "Technical Support")
arvisai_ai_reply_agent_staff_id CRM staff attributed as the author of the AI reply

Warning: With auto-reply enabled, every new ticket created (with assigned staff) will automatically receive an AI-generated response. Test with a test ticket before enabling in production.


2. Template Engine — usage and template creation

Where: /admin/arvisai/templates

Templates seeded at installation: Write Proposal · Facebook Ads · Write Contract · Cold Email · Welcome Email · Follow-Up Email · Article Generator · Content Rewrite · Summarize Text · Product Description

Create a custom template:

Field Description
template_name Name
template_category_id Category (Emails / Social Media / Contents / Blog Posts / Video / CRM)
custom_prompt The prompt with {{variable_name}} placeholders
custom_inputs JSON with UI field definitions: `[{"input_name":"...", "input_label":"...", "input_field_type":"textarea

Example custom_prompt:

Write a cold email for a prospect in the {{industry}} industry. 
Focus on {{pain_point}} and mention our {{product_name}} solution.

Tone of Voice options (12): funny · casual · excited · professional · witty · sarcastic · feminine · masculine · bold · dramatic · grumpy · secretive

Language field: free text — enter any language (e.g.: "Romanian", "French"). It is added to the prompt with the instruction to write in that language.


3. Audio Transcription vs. Audio Translation

Transcription Translation
OpenAI endpoint /v1/audio/transcriptions /v1/audio/translations
Output language Same language as the audio Always English
Language detection Automatic (Whisper) Automatic (Whisper)
Accepted formats .mp3, .m4a .mp3, .m4a

Recommended workflow:

  • You have a Romanian recording → Transcription → get text in Romanian
  • You have a recording in any language and want it in English → Translation
  • You want to copy the transcription to another CRM module (lead, ticket, note) → manual copy-paste (no automatic transfer button)

4. Generated documents

Where: /admin/arvisai/documents

Documents saved from the Template Engine are stored in tblArvisai_documents with:

  • document_name — document name
  • document_description — HTML content (generated in TinyMCE)

Limitations: documents have no link to other CRM entities (lead, client, project). They are visible exclusively to the staff member who created them (user_id = get_staff_user_id()).


Required permissions

Permission Access
arvisai → view Global access to all tools
arvisai → view_chat Chat tool
arvisai → view_image_gen / create_image_gen Image Generator
arvisai → view_transcription / create_transcription Audio Transcription
arvisai → view_translation / create_translation Audio Translation
arvisai → view_templates / create_templates Template Engine
arvisai → view_template_categories View template categories
ArvisAI Settings is_admin() exclusively

Note: There is no create_chat permission — anyone who can view Chat can also send messages.


Gotchas

Problem Cause Solution
"Invalid API Key" on any operation arvisai_openai_secret_key wrong or missing Re-enter the API key from OpenAI Platform → API Keys
Audio file rejected on upload Extension not allowed or size limit exceeded Check allowed_extensions + max_size in Settings; convert to .mp3 if another format
Translation comes out in English, not Romanian Correct behavior — Translation = always English Use Transcription (not Translation) for output in the original language
Auto-reply sends on internal tickets Hook triggers on any ticket with admin assigned Disable arvisai_ai_autoreply_on_opening_ticket or set stricter conditions manually
Generated images not displaying OpenAI URL expired before local download Regenerate the image — the module downloads automatically on generation
Generated document has disappeared Filtered by user_id — another user cannot see it Documents are private per staff member

Module references

  • Tickets — auto-reply on ticket opening
  • WhatsApp — another channel with AI replies (bot_type=12, separately configurable provider)
  • ArvisAI — module documentation