# Entity Type check on Rules

**URL:** <https://forum.sambapos.com/t/entity-type-check-on-rules/6360>\
**Category:** V4 Question\
**Created:** [July 26, 2015, 4:24pm UTC](https://forum.sambapos.com/t/entity-type-check-on-rules/6360 "2015-07-26T16:24:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sabata](https://forum.sambapos.com/user_avatar/forum.sambapos.com/sabata/32/8002_2.png) [@sabata](https://forum.sambapos.com/u/sabata)\
**Post date:** [July 26, 2015, 4:24pm UTC](https://forum.sambapos.com/t/entity-type-check-on-rules/6360/1 "2015-07-26T16:24:28Z")

</div>

I am having a hard time getting this to work and would like your help.

Basicly I have multiple Entity Types like, Rooms and Suites. What I want is to create a Rule that will do the following.  
When Automation Command Executed (clicked check-in) the system will verify Entity Type Name and if it matches Rooms it’ll proceed and add the Actions … then if its Suites, it’ll add other actions instead.

I cant seem to get it verify Entity Type however, maybe I am doing it wrong? Can I add two of those conditions together?  
Please direct me in the right direction, thanks.

I tried a variation of these:  
{ENTITY TYPE:Name} equals or matches Room  
[ENTITY TYPE:Name] equal Room  
[ENTITY NAME] equal Room  
and many others … 😓

 ![](https://forum.sambapos.com/uploads/default/original/2X/2/2f07d21d91e3045abfcb990a9c9dac4437bdcbf8.png)

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [July 26, 2015, 4:41pm UTC](https://forum.sambapos.com/t/entity-type-check-on-rules/6360/2 "2015-07-26T16:41:01Z")

</div>

You cannot read the Entity unless a Ticket is created and/or loaded/opened. In your case, the value for Entity is likely either blank or null, so your Rule will not fire with the constraints shown.

If you create a Rule for Entity Selected and/or Ticket Entity Changed, you could store the Entity in a program setting temporarily, then check against that setting in the Rule you have shown.

---

<div class="post-metadata">

**Author:** ![sabata](https://forum.sambapos.com/user_avatar/forum.sambapos.com/sabata/32/8002_2.png) [@sabata](https://forum.sambapos.com/u/sabata)\
**Post date:** [July 26, 2015, 4:45pm UTC](https://forum.sambapos.com/t/entity-type-check-on-rules/6360/3 "2015-07-26T16:45:55Z")

</div>

Let me see if I understood it well…

My entity is blank thus it wont fire?  
I tought that since I open an entity and then click the button that it would check that entity type? No?

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [July 26, 2015, 4:50pm UTC](https://forum.sambapos.com/t/entity-type-check-on-rules/6360/4 "2015-07-26T16:50:46Z")

</div>

If that is your order of operation, then this should work, yes. But you need to get the Constraint correct.

Post a screenshot of your Room Entity Type.

You should be able to use something like:

{ENTITY NAME:Room} Is Not Null

To discover the value in these types of tags, add a Show Message action to your Rule and remove the Room Constraint. For the Message, try different syntaxes to display the Entity until you find one that works for you.

---

<div class="post-metadata">

**Author:** ![sabata](https://forum.sambapos.com/user_avatar/forum.sambapos.com/sabata/32/8002_2.png) [@sabata](https://forum.sambapos.com/u/sabata)\
**Post date:** [July 26, 2015, 5:03pm UTC](https://forum.sambapos.com/t/entity-type-check-on-rules/6360/5 "2015-07-26T17:03:24Z")

</div>

{ENTITY NAME:Room} Is Not Null

**Worked like a charm! Thank you.** 😄

I am still learning syntaxes so its more complicate for me. If you get the time sometime maybe you could show me the “Show Message” action tip? As I didnt understand it 100%

Thank you for your help!
