Question About entity last order

Hi Again Samba team,
I’m trying to create a rule
That will show me the last order of the customer entity selected., But the “load last order” action does not work
How can I make it so that when I choose an Existing Customer I could automatically receive details of the last order that he performed such as date, time, order items and the amount paid.
what information can be displayed and where they will be displayed
Is it possible at all??

We haven’t had that since V2.
Load Last Order is only used for order items while in a ticket - it allows you to load the last order item added and modify it.

This is a good question, my question is why? What will you do with the ticket details? Do you want to use it as a template for a new order?

in most cases the customer ordering the pizza with the same toppins and
It can greatly shorten the call time on the phone
And improve customer service.

We could retrieve the last customer order, but only to display.

This is where we will need @emre and his genius mind.

We need an action to load a previous ticket as a template for a new ticket. We can use an Automation Command Button on the Entity screen to load the previous ticket.

when I choose an Existing Customer Should be Automation Command Button on the Entity screen to load the previous ticket or Opens automatically (depending on the preference of the user).Then inside the ticket ther is a choice between re-open the ticket or start a new ticket

I’ve implemented Clone Ticket setting for Create Ticket action. So we can store last ticket id as an Entity Custom field or Entity State and re-call last ticket. On paid tickets we can display a “clone” button. Clicking clone button will duplicate ticket. What do you think about that?

1 Like

hi @emre
I finally understood what you meant, sorry

i display in paid tickets a “clone” button.
And it works great
how can i store last ticket id as an Entity Custom field and re-call last ticket
When entity is selected??

You can use Update Entity Data action to store the ticket ID. For example you can use ticket closing rule and read ticket id with {TICKET ID} tag.

To recall ticket you can use Display Ticket action and pass stored ticket id as parameter. For example if the ticket id stored under Last Ticket custom field your can read it with {ENTITY DATA:Customer:Last Ticket} tag.

1 Like

I hope I understood
I will try now

I managed to create the rule that stores ticket ID in a custom field
I tried to create a rule To recall ticket when entity is selected
But without success
Please could you post screenshots or video that explains how to do this??
Thank you so much for the help

@emre Well I tried everything, probably that I did not understand how to do what you wrote. PLEASE HELP

@pizzaeilat4 I’ll do… but this is not just a simple answer. please let me find some free time ;)

1 Like

Thank you so much emre.

@emre, I’ll message you after work tomorrow, and if you haven’t got a solution ready for @pizzaeilat4, I will create the steps to set it up.
I have to call it quits for tonight - I need sleep :tired_face:


thenks john.I really appreciate it

I’ll try to do it tonight after finishing some work but if it won’t be possible I’ll be happy to receive help for tomorrow :slight_smile:

@JohnS I’ve made some changes to Entity Selector widget for easier implementation. We can wait until next release.


@pizzaeilat4 this is a sample sdf database for demonstrating ticket cloning feature. Please install latest release [4.1.23] . (142.1 KB)

Note: Search Customer is a custom screen that contains a Entity Search Widget. Check widget settings for implementation details about recalling ticket that stored as an Entity Custom Field.

1 Like

Wow thank you so much emre
I’ll try it and let you know if I managed

Wow @emre thank you so much
It works great