Recall & Clone (Customer) Last Ticket

Thank You very much rick. and i have follow the tutorial from here https://kb.sambapos.com/en/4-18-how-to-clone-and-recall-customers-last-ticket/ and have re check many times. and thanks i wil wait for ur reply

Several tutorials are wrong on there. The forum has a better more accurate listing of tutorials.

I would guess you are mixing two methods of storing the last ID.
Using entity state would be a valid way to log the last ticket for that entity however your trying to save a local setting using an expression to call an entity state and then calling a setting which wouldn’t match the name your trying to call.

Actually i was wrong, what it is doing is correct, the error message is saying it cant find last ticket for customer whose primary field is 023232323

ive installed the text file that Q did direct from his V5 tutorial and im having the same issue, the issue is definitely to do with not storing or recalling the ticket ID

When does ticket ID get created, i though it was after the ticket has closed, the rule that is saving the ticket id is on a Before Ticket Closing Event, at this point has the ticket ID even been generated yet? this could by why it isnt recalling previous ticket as there is no ticket ID to recall?

yes this is not recalling the ticket id

I think it’s the action constraint. I noticed it in a different setup I was working on

I think it is a bug when you’re trying to match at empty stream I think the quotes with empty string like what we used to use is not working for some reason

Sorry I’m using speak to text and it doesn’t quite understand me sometimes

I dont think its adding the entity state, would the entity state be shown at the top of the ticket? if so its not adding it when ticket is closing, so there isnt one to find when trying to load last ticket

Ok so take a step back and add some debug actions.
Add a show message or ask question in a couple of places and track the value.
Add one in rule where your saving the I’d as entity state to display used value.
Add one where you move value from entity to setting to check it matches etc
And one showing the setting value on the last one where you showing customer number.
Follow the flow and ‘chase the queen’ to check value is moving as expected.

Only if he’s admin will it show.

Yea I downloaded Q’s V5 version and when it logged in as admin add a customer to ticket and pay the ticket, if i then use ticket explorer to recall the ticket there is no entity state showing at the top of the ticket so I’m assuming it isn’t actually adding an entity state which is why we keep getting the error message saying it can’t load the last ticket, there’s no entity state being added for it to “look up” and then display the ticket

Ticket state is added on ticket closing during the automation. Not after paying a ticket.

But ticket ID is created after ticket is closed is it not?

So it can’t update entity state to be the ticket ID as the ticket ID hasn’t generated when it’s trying to update the state?

So I think your mistaken as to what we are doing he3re. This is so you can pull up an already closed ticket… its to clone the previous ticket.

yea but when closing the ticket it is updating the entity state to be the ticket ID

Then it is recalling that (previous) ticket using the entity state of ticket id

So if the ticket ID is only generated after the ticket is closed, it cant be the entity state when that updates before ticket closing

The clone part works fine, its just the recalling of the last ticket i dont think the ticket state is actually updating, when im testing it there is no entity state being added to the ticket, so there is nothing there for the automation to use to recall it

ive just tried a basic update entity state action on a ticket with a customer entity assigned using an auto command rule. i hard coded the entity state to update to 1234

so i add customer to ticket, press the update entity state auto command button which should then fire the rule with an update entity state action and update it to 1234 but nothing happens

You wont see Entity States on a ticket… thats Ticket States. You can see Entity States in a Entity Screen though.

doesnt this setting allow you to see an entity state on a ticket? (Show on Ticket being ticked)
image

1 Like

I dunno this really doesn’t interest me enough to install that configuration to test it. I still think its something wonky with the Action Constraints.

i deleted the action constraints to test but same thing happens, i still think its to do with the update entity state as i cant even get it to work with just a rule and action to update entity state

afraid i cant play with it anymore at the min its 00:25 here and im up early for the airport in the morning as were going to disney world florida :slight_smile:

2 Likes