Help with approvals

I am trying to create approvals based on a custom field. I have a field for
the severity of the issue: emergency, required, and planned. I would like
the logic to follow…

if CustomFieldValue = emergency
{
===Create-Ticket: approval1
Depended-On-By: TOP
Queue: Approvals-PO
Type: approval
Owner: approveadmin #note this is so that notifications work properly
Content: Someone has created a purchase requisition. Please review and
approve it, so they can spend some money.
ENDOFCONTENT

===Create-Ticket: approval2
Depended-On-By: TOP
Queue: Approvals-PO
Type: approval
Owner: approveadmin2 #note this is so that notifications work properly
Content: Someone has created a purchase requisition. Please review and
approve it, so they can spend some money.
ENDOFCONTENT
}

elseif CustomFieldValue = required
{
===Create-Ticket: approval1
Depended-On-By: TOP
Queue: Approvals-PO
Type: approval
Owner: approveadmin #note this is so that notifications work properly
Content: Someone has created a purchase requisition. Please review and
approve it, so they can spend some money.
ENDOFCONTENT
}

I am new to RT and just don’t know how or where the code for this show be.
Any help would be greatly appreciated