This is what I have tested before. Different model of AP add to different VLAN.
if (!$match($EVENT.NAME,DEVICE-DETECT)) then
if (!$match($EVENT.DEVICE_MODEL,AP4511)) then
create log entry "ADD port $(EVENT.USER_PORT) to VLAN AP4511_1"
configure AP4511_1 add port $EVENT.USER_PORT
endif
if (!$match($EVENT.DEVICE_MODEL,AP4532)) then
create log entry "ADD port $(EVENT.USER_PORT) to VLAN AP4532_1"
configure AP4532_1 add port $EVENT.USER_PORT
endif
endif
if (!$match($EVENT.NAME,DEVICE-UNDETECT)) then
create log entry "AP is moved from port $(EVENT.USER_PORT)."
set var cli.out 0
show port $EVENT.USER_PORT information detail
set var baselist $tcl(split ${cli.out} "\n")
set var indexvalue $tcl(lsearch -glob $baselist *Name*)
set var vname $tcl(lindex $baselist $indexvalue)
set var vname $tcl(split $vname " ")
set var vname $tcl(lindex $vname 2)
set var vname $tcl(string range $vname 0 end-1)
config vlan $vname del port $EVENT.USER_PORT
endif