I am trying to built a auto message for guest arrival instrucitons.
FOr the code of the door, i have different scenario and i am trying to buiit a smart logic around this with If insode if.
Here is my logic:
If there is a unique code for the door in the booking (in info code lockstate_pin) then use this for the apartemnt code. otherwise, 2 scenarios:
1st is if there is a code in the unitcode 2 tempalte, use it, if it is empty, use the room template 4.
here is what i Build but the second if doesn't work
[IFIN:LOCKSTATE_PIN:[BOOKINGINFOITEMS]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|[IF:[UNITNAME:1]::[ROOMTEMPLATE4]|[UNITNAME:1]]]
I tried both if individually like this [IFIN:LOCKSTATE_PIN:[BOOKINGINFOITEMS]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|]
[IFLIKE:[UNITNAME:1]::[ROOMTEMPLATE4]|[UNITNAME:1]]
It works as expected, but now i want the second if applied only if the first if is false
It is not very easy to trouble shoot the code, and I am a bit confused with special versions as it is not explain in the help what is the difference with the normal version
SOmeons can help with the syntax?
smart logic template variables syntax
-
- Posts: 298
- Joined: Wed Dec 28, 2016 2:20 pm
You can use the Booking Header field in Settings > Account > Preferences to test the template variable statements, enter the code and then open a booking, this will then show the results for that booking.
[IFIN:LOCKSTATE_PIN:[BOOKINGINFOCODES]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|[IF>^[UNITNAME1:1]^0^[UNITNAME1:1]~[PROPERTYTEMPLATE1]]|]
[IFIN:LOCKSTATE_PIN:[BOOKINGINFOCODES]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|[IF>^[UNITNAME1:1]^0^[UNITNAME1:1]~[PROPERTYTEMPLATE1]]|]