mysterious-telephone-82894
02/08/2025, 2:13 PMObjective:
I need to determine whether a given address (@user.Address) falls under an "Allowed" delivery zone or a "High-Risk" area where delivery is not possible.
Instructions:
Extract the suburb from @user.Address.
Check if the suburb is in one of the Allowed Delivery Zones:
Johannesburg (JHB): UJ, WITS, DFC, Rosebank, Braam CBD, Doornfontein, Maboneng, Newtown, Crown Mines, Westdene, Melville, Brixton, Richmond, Parktown, Ormonde, Southgate, Naturena, Meredale, Ridgeway, Mondeor, Marshalltown, Oakdene.
Soweto: Pimville, Diepkloof, Dube, Rockville, Dhlamini, Orlando East, Orlando West, Devland, SWGC, UJ George Tabor Campus.
If the suburb is not in the allowed list, check if it is in a High-Risk Area (No Delivery - Redirect to Makro):
General High-Risk: Hillbrow, Alexandra, Berea, Yeoville.
Soweto High-Risk: Naledi, Zola, Emndeni, Eldorado Park, Lenasia.
If the address is in an Allowed Zone, classify it as "True" (eligible for delivery).
If the address is in a High-Risk Area, classify it as "False" (delivery not available, redirect to Makro).