Can I use action constraint to make this work?

In this rule, SambaPOS will search for a customer then show a question “Are you sure?”. The problem is it will show “Are you sure?” even if no customer found. Is my constraint syntax wrong?

‘{ENTITY DATA:Customer}’ != ‘’ does not work

Constraints are calculated when the rule is run, therefore they won’t take into account any changes made in previous actions within that rule. So in your case you search for the entity but even when the new entity is selected, it won’t affect that constraint as it was checked when the rule was first run. You will need to pass to a new rule to be able to check that constraint after you did the search.

1 Like

Thank you! Can you tell me which action might help me check the search customer entity result and then I can return to the LC-ClaimPointsConfirmation if the result is not null?

you need to add an automation command action into that rule after your 2nd action, then remove the 3rd action and put it in a new auto command rule which is triggered from the auto command action you will add in that rule above

You need to split the 3rd action into a rule of its own to run after the rule posted above with just the first 2 actions in it

1 Like

If you need multistep you can use execute automation command, ie first rule selects entity, execute seccond rule, seccond rule contains constraint based on entity selected.

My constraint won’t work for sure, can you give me a correct one idea? I’m going back to the bad ‘{ENTITY DATA:Customer}’ == ‘’ case.

What entity data though? You are calling for entity data but not specifying which one.

'{ENTITY DATA:Customer:WhatCustomDataFieldHere}' != ''
1 Like

try ‘{ENTITY NAME:Customer}’ instead

and check it is Customer and not Customers

1 Like

Sadly, whatever I do

‘{ENTITY DATA:Customer:FullName}’ != ‘’
‘{ENTITY DATA:Customer:FullName}’ == ‘’
‘{ENTITY NAME:Customer}’ != ‘’
‘{ENTITY NAME:Customer}’ == ‘’

The action always turns to No, even if search action found a customer or not.

show a screenshot of your entity settings

It’s basically the default Customer entity.



Where are you executing that from? Are you in an open ticket? Are you sure it can read Entity Data? Is an Entity Loaded or a ticket open for it to read from?

You are still trying to use an action constraint that needs a previous action in the same rule. That won’t work as Mark already pointed out.

Yeah, I’m pretty sure the rule was run in an open ticket. Entity loaded just fine too.

You’re right, I see no reason for this rule to work. It is just the same with what I did in the beginning. Do you have an idea to get me out? I feel so dull up until this point. :expressionless:

Execute the automation command. Don’t constrain it. Pass a value with it and the constrain it.

1 Like

Still not work, maybe I understand wrongly the meaning of pass a value in your post or maybe there must be something wrong with the way I do constraint.

Oh, I didn’t put brackets into constraint, will check and get back soon.

Yes you are mising {}

Also, that action will be executed if ‘FullName’ is empty. Is that what you are trying to achieve?

My guess would be that you want to do use loyalty points if the name is not empty. So

 '{ENTITY NAME:Customer}' != '' 
1 Like

I’m sorry for a late feedback. It works now, exactly with what you guys have tried telling me to! Thank you so much, I’m really appreciate your help and your patience explaining this matter to me.

1 Like