Installation Guide

    This guide walks through the end-to-end steps required to install AscendixAI Chat into a Salesforce org and get the product working. Each step is required unless explicitly marked optional.

    1. Configure the LLM Provider

    Named Credential — OpenAI_API

    The OpenAI API named credential is deployed with endpoint https://api.openai.com. The API key is read from custom settings and attached at runtime, so no additional External Credential setup is required for the default configuration.

    Org AI Provider Settings

    Setup → Custom Settings → Org AI Provider Settings → Manage → New (Default Organization Level Value)

    • OpenAI Active = ✓
    • OpenAI API Key = your API key

    AI Chat Settings

    Controls runtime behavior, including how many records a single request can create or update.

    Setup → Custom Settings → AI Chat Settings → Manage → New (Default Organization Level Value)

    • Max Create/Update Records = value

    2. Assign Permission Sets
    Two permission sets ship with the product:

    Permission Set Audience
    AscendixRE AI Chat User Standard users of the chat
    AscendixRE AI Chat Admin Administrators managing prompts and settings

    3. Schedule Background Jobs
    Two scheduled jobs must be running for the full feature set.

    Run the code below in the Anonymous Window in the Developer Console

    Agent Plan Scheduler — runs every 15 minutes:

    System.schedule(
     'AgentPlanScheduler 0 min',
     '0 0 0 * * ?',
     new AgentPlanScheduler()
    );
    System.schedule(
     'AgentPlanScheduler 15 min',
     '0 0 15 * * ?',
     new AgentPlanScheduler()
    );
    System.schedule(
     'AgentPlanScheduler 30 min',
     '0 0 30 * * ?',
     new AgentPlanScheduler()
    );
    System.schedule(
     'AgentPlanScheduler 45 min',
     '0 0 45 * * ?',
     new AgentPlanScheduler()
    );

    Memory Decay Scheduler — runs daily at 03:00:

    System.schedule(
     'AgentMemoryDecay',
     '0 0 3 * * ?',
     new AgentMemoryDecayScheduler()
    );

    Verify via Setup → Scheduled Jobs. Both entries should appear with valid next-run timestamps.


    4. Add the Chat UI to Lightning Pages

    1. Open Setup → Lightning App Builder
    2. Edit the target page (App, Home or Record page)
    3. Drag the agentChat custom component onto the canvas
    4. Save and activate the page for the appropriate app or profile

    5. Verify the Installation
    Metadata sanity checks — run via Query Editor in the Developer Console:

    SELECT COUNT() FROM AgentPrompt__mdt WHERE IsActive__c = TRUE
    // Expected: > 0
    SELECT COUNT() FROM Memory__c WHERE Is_Global__c = TRUE
    // Expected: > 0


    Scheduled jobs — confirm both AgentPlanScheduler and AgentMemoryDecay are listed in Setup → Scheduled Jobs.

    Smoke test:

    1. Log in as a user assigned to AscendixREAIChatUser
    2. Open the page where agentChat is embedded
    3. Send: Show my 5 most recently created Accounts
    4. Confirm results render in the search result list
    5. Send: Remember that I prefer X
    6. Confirm thumbs-up/down controls work and that an Agent Action Log record is created

    6. Uninstall / Rollback

    1. Delete both scheduled jobs: Setup → Scheduled Jobs → Del for AgentPlanScheduler and AgentMemoryDecay
    2. Purge data objects: Memory__c, MemorySignal__c, AgentSession__c, AgentChatMessage__c, AgentPlan__c, AgentPlanRun__c, AgentActionLog__c, LLM_Usage_Event__c