CenterTEST.ps1

# WHEN CHANGING IN VBAF-CENTER >>> ALL YOU DO IS >>> RUN C:\Users\henni\OneDrive\WindowsPowerShell\VBAF-Center\VBAF-Center\VBAF.Center.Publish.ps1
. "VBAF-Center\VBAF.Center.LoadAll.ps1"

Phase 1  Customer profile
New-VBAFCenterCustomer                First time you onboard a new customer        Once per customer         Purple Once per customer  setup only
Get-VBAFCenterCustomer                Look up one customer's details When needed Amber When needed — you decide Get-VBAFCenterAllCustomers See all customers at a glance When needed Amber When needed — you decide Update-VBAFCenterCustomer Customer changes contact, agent or problem Rarely Amber When needed — you decide Remove-VBAFCenterCustomer Customer leaves or test cleanup Rarely Amber When needed — you decide Phase 2 — Problem classification Get-VBAFCenterClassification Check which agent was auto-selected After onboarding Purple Once per customer — setup only Get-VBAFCenterAgentMap See all available agents and domains When needed Amber When needed — you decide Set-VBAFCenterAgentMap Add a new domain not in the default list Rarely Amber When needed — you decide Phase 3 — Signal acquisition New-VBAFCenterSignalConfig Define a signal source for a customer Once per signal Purple Once per customer — setup only Get-VBAFCenterSignal Check one live signal value When needed Amber When needed — you decide Get-VBAFCenterAllSignals See all signals for a customer When needed Amber When needed — you decide Test-VBAFCenterSignalConfig Verify signals are reading correctly After setup Purple Once per customer — setup only Phase 4 — Normalisation Invoke-VBAFCenterNormalise Scale raw values to 0-1 for the AI Automatic in pipeline Green Daily / automatic — runs itself Get-VBAFCenterNormalisationReport See detailed normalisation results When debugging Amber When needed — you decide Methods: MinMax | Standard | Robust | PassThrough Phase 5 — Agent router Invoke-VBAFCenterRoute Route signals to the correct agent Automatic in pipeline Green Daily / automatic — runs itself Register-VBAFCenterAgent Register a trained agent manually Once per customer Purple Once per customer — setup only Get-VBAFCenterRouteStatus Check which agents are loaded When debugging Amber When needed — you decide Phase 6 — Action interpreter New-VBAFCenterActionMap Define business language for each action Once per customer Purple Once per customer — setup only Invoke-VBAFCenterInterpret Translate action number to plain text Automatic in pipeline Green Daily / automatic — runs itself Get-VBAFCenterActionMap Review customer's action definitions        When needed               Amber When needed  you decide 
                                    
Phase 7  Onboarding wizard         
Start-VBAFCenterOnboarding            Full setup of a new customer in one go        Once per customer         Purple Once per customer  setup only
Show-VBAFCenterSummary              Review what is configured for a customer    When needed               Amber When needed  you decide 
                                    
Phase 8  Scheduling engine         
Invoke-VBAFCenterRun                Run the full pipeline once manually            Testing / demo            Amber When needed  you decide 
Start-VBAFCenterSchedule            Start automatic checking on a schedule        Shadow / go-live          Green Daily / automatic  runs itself  
Get-VBAFCenterRunHistory            Review recent AI recommendations            Weekly review             Green Daily / automatic  runs itself
                                    
Phases 9-12  Advanced              
Start-VBAFCenterPortal              Show one customer their live dashboard        Meetings / demos          Green Daily / automatic  runs itself
Start-VBAFCenterDashboard            Your overview of all customers at once        Daily monitoring          Green Daily / automatic  runs itself
Start-VBAFCenterAutoConnect            Connect a real data source for a customer    Once per customer         Purple Once per customer  setup only
New-VBAFCenterInvoice                Generate monthly invoice for a customer      Monthly                   Light greenMonthly  billing cycle

. "VBAF-Center\VBAF.Center.Assessment.ps1" Run ALL 4 BEFORE every onboarding FOR NEED  Once per customer  Purple Once per customer  setup only
. "VBAF-Center\VBAF.Center.TMSSimulator.ps1"
. "VBAF-Center\VBAF.Center.TMSSimulator.Standard.ps1"
. "VBAF-Center\VBAF.Center.TMSSimulator.Advanced.ps1"
. "VBAF-Center\VBAF.Center.TMSSimulator.Full.ps1"

Start-VBAFCenterOnboarding covers all Purple setup functions in one go


#___________________________________ RESET FILES IN BETWEEN TEST'S ________________________________________________

# Clean reset — removes all test customers and their data
$base = "$env:USERPROFILE\VBAFCenter"

# Remove all customer profiles
Remove-Item "$base\customers\*.json"    -Force -ErrorAction SilentlyContinue
# Remove all signal configs
Remove-Item "$base\signals\*.json"      -Force -ErrorAction SilentlyContinue
# Remove all action maps
Remove-Item "$base\actions\*.txt"       -Force -ErrorAction SilentlyContinue
Remove-Item "$base\actions\*.json"      -Force -ErrorAction SilentlyContinue
# Remove all schedules
Remove-Item "$base\schedules\*.json"    -Force -ErrorAction SilentlyContinue
# Remove all history
Remove-Item "$base\history\*.json"      -Force -ErrorAction SilentlyContinue
# Remove all invoices
Remove-Item "$base\invoices\*.txt"      -Force -ErrorAction SilentlyContinue

Write-Host "Clean slate — all test data removed!" -ForegroundColor Green

. "VBAF-Center\VBAF.Center.LoadAll.ps1"
Get-VBAFCenterAllCustomers              # CHECK


<#___________________ ALLE NEDENSTÅENDE DATA ER AT FINDE PÅ GITHUB VBAF-CENTER (PAGES)__________________
 
CustomerID : TruckCompanyDK
CompanyName : Truck Company DK
Country : Denmark
BusinessType : Logistics
Problem : Too many idle trucks and late deliveries
Agent : FleetDispatch
Contact : ceo@truckcompanydk.dk
Notes : First test customer

        CustomerID = $CustomerID
        CompanyName = $CompanyName
        Country = $Country
        BusinessType = $BusinessType
        Problem = $Problem
        Agent = $Agent
        Contact = $Contact
        Notes = $Notes
        CreatedDate = (Get-Date).ToString("yyyy-MM-dd")
        Status = "Active"
        Version = "1.0"
 
 
TESTING PHASE 1-8 (PROMPT ARGUMENTS)
 
>>>>>>>>>>>>>>>>>>>>>>@ Get-VBAFCenterCustomer
cmdlet Get-VBAFCenterCustomer at command pipeline position 1
Supply values for the following parameters:
CustomerID: TruckCompanyDK
 
Customer Profile:
  CustomerID : TruckCompanyDK
  Company : Truck Company DK
  Country : Denmark
  Business : Logistics
  Problem : Too many idle trucks and late deliveries
  Agent : FleetDispatch
  Contact : ceo@truckcompanydk.dk
  Created : 2026-04-03
  Status : Active
 
Contact : ceo@truckcompanydk.dk
Agent : FleetDispatch
Version : 1.0
CustomerID : TruckCompanyDK
Notes : Third test customer
Problem : Too many idle trucks and late deliveries
CreatedDate : 2026-04-03
Status : Active
BusinessType : Logistics
CompanyName : Truck Company DK
Country : Denmark
 
__________________
 
 
>>>>>>>>>>>>>>>>>>>>>>>>>>@ Get-VBAFCenterAllCustomers
 
Contact : ceo@nordlogistik.dk
Agent : FleetDispatch
Version : 1.0
CustomerID : NordLogistik
Notes :
Problem : Fleet dispatch optimisation
CreatedDate : 2026-03-28
Status : Active
BusinessType : Logistics
CompanyName : NordLogistik A/S
Country : Denmark
 
Contact : ceo@truckcompanydk.dk
Agent : FleetDispatch
Version : 1.0
CustomerID : TruckCompanyDK
Notes : Third test customer
Problem : Too many idle trucks and late deliveries
CreatedDate : 2026-04-03
Status : Active
BusinessType : Logistics
CompanyName : Truck Company DK
Country : Denmark
 
________Phase 2 ____________________________
 
>>>>>>>>>>>>>>>>>>>>>>>>>>@ Get-VBAFCenterClassification
cmdlet Get-VBAFCenterClassification at command pipeline position 1
Supply values for the following parameters:
CustomerID: TruckCompanyDK
 
Problem Classification:
  Customer : TruckCompanyDK
  Problem : Too many idle trucks and late deliveries
  Keyword : logistics
  Class : BUSINESS-LOGISTICS-FLEET
  Agent : FleetDispatch
  Phase : 28
  Description : Fleet dispatch optimisation
 
Name Value
---- -----
ClassificationCode BUSINESS-LOGISTICS-FLEET
CustomerID TruckCompanyDK
Description Fleet dispatch optimisation
Phase 28
MatchedKeyword logistics
ProblemText Too many idle trucks and late deliveries
RecommendedAgent FleetDispatch
 
______________Phase 3 ____________________
 
>>>>>>>>>>>>>>>> New-VBAFCenterSignalConfig
 
CustomerID : TruckCompanyDK
SignalName : On-Time Delivery
SignalIndex : Signal2
SourceType : Simulated
RawMin : 0
RawMax : 100
 
 
______________Phase 4 ____________________
 
 
>>>>>> Invoke-VBAFCenterNormalise — normalise signals
 
CustomerID : TruckCompanyDK
RawSignals[0]: 27.0
RawSignals[1]: 64.0
RawSignals[2]: [just press Enter]
 
 
______________Phase 5 ____________________
 
>>>>>>>>>>>>> Invoke-VBAFCenterRoute — route signals to agent
 
CustomerID : TruckCompanyDK
NormalisedSignals[0]: 0.27
NormalisedSignals[1]: 0.64
NormalisedSignals[2]: [just press Enter]
 
>>>>>>>>>>>>>>>> Register-VBAFCenterAgent
 
CustomerID : TruckCompanyDK
AgentName : FleetDispatch
Agent : [just press Enter]
 
______________Phase 6 ____________________
 
>>>>>>>>>>>>>>>> New-VBAFCenterActionMap — define action meanings
 
CustomerID : TruckCompanyDK
Action0Name : Monitor
Action0Command : Watch and log — fleet healthy
Action1Name : Reassign
Action1Command : Move idle truck to pending delivery
Action2Name : Reroute
Action2Command : Switch to faster route
Action3Name : Escalate
Action3Command : Call operations manager immediately
 
>>>>>>>>>>>> Invoke-VBAFCenterInterpret — translate action number
 
CustomerID : TruckCompanyDK
ActionNumber : 1
 
>>>>>>>>>>> Get-VBAFCenterActionMap
 
CustomerID : TruckCompanyDK
 
______________Phase 7____________________
 
>>>>>>>>> Start-VBAFCenterOnboarding — full setup wizard
 
Press ENTER to start : [just press Enter]
Customer ID : TruckCompanyDK2
Company name : Truck Company DK
Country : Denmark
Business type : Logistics
Problem : Too many idle trucks and late deliveries
Contact email : ceo@truckcompanydk.dk
Accept agent? (Y/N) : N
Manual agent : FleetDispatch
Signal 1 name : Empty Driving
Source type : Simulated
Raw minimum value : 0
Raw maximum value : 100
Signal 2 name : On-Time Delivery
Source type : Simulated
Raw minimum value : 0
Raw maximum value : 100
Signal 3 name : [just press Enter]
Signal 4 name : [just press Enter]
Normalisation method : MinMax
Action 0 name : Monitor
Action 0 command : Watch and log — fleet healthy
Action 1 name : Reassign
Action 1 command : Move idle truck to pending delivery
Action 2 name : Reroute
Action 2 command : Switch to faster route
Action 3 name : Escalate
Action 3 command : Call operations manager immediately
 
>>>>>> >>>> Show-VBAFCenterSummary — show customer setup
 
CustomerID : TruckCompanyDK2
 
______________Phase 8 ____________________
 
>>>> Invoke-VBAFCenterRun — run pipeline once
 
CustomerID : TruckCompanyDK2
 
 
>>>>> Start-VBAFCenterSchedule
 
CustomerID : TruckCompanyDK2
MaxRuns : 3
 
__________________________________________
 
CLEAN-UP:
 
Remove-VBAFCenterCustomer -CustomerID "TruckCompanyDK"
Remove-VBAFCenterCustomer -CustomerID "TruckCompanyDK2"
Get-VBAFCenterAllCustomers
 
#>


#_______________________________ ALLE NEDENSTÅENDE DATA ER CONNECTION SYSTEMERS DATA ____________________

<#
 
1 TMS-Generic — any TMS with API
Signal nameEmpty Driving*
API endpointhttps://tms.company.dk/api/idle*
Raw minimum0
Raw maximum100
Need their REST API URL — ask IT department
 
2 TMS-Navision — Microsoft Dynamics
Signal nameFleet Utilisation*
API endpointhttps://nav.company.dk/api/fleet*
Raw minimum0
Raw maximum100
Navision has OData REST endpoints built in
 
3 TMS-SAP — SAP Transportation
Signal nameLoad Factor*
API endpointhttps://sap.company.dk/api/load*
Raw minimum0
Raw maximum100
SAP TM exposes REST via SAP API Management
 
4 Excel-CSV — file export
Signal nameSignal 1*
CSV file pathC:\Data\fleet.csv*
Column nameEmptyDriving*
Raw minimum0
Raw maximum100
Customer exports daily CSV from their system
 
5 Manual — no system
Signal nameEmpty Driving*
Raw minimum0
Raw maximum100
Customer types the number themselves each day — no API needed
 
6 Windows-IT — WMI infrastructure
Signal nameCPU Load*
WMI ClassWin32_Processor*
WMI PropertyLoadPercentage*
Raw minimum0
Raw maximum100
For IT customers — reads Windows system data directly
 
7 Simulated — demo and shadow mode
Signal nameEmpty Driving*
Raw minimum0
Raw maximum100
No real data source needed. VBAF generates realistic values automatically. Use this during demo and shadow mode before connecting to a real system.
 
#>