Get right Ticket ID for a create ticket department

I have a department which Ticket Creation Methot is set to “Create Ticket”.

When I click on my button CC, it calls a script which does the payment.
Then Displays a message which shows me Ticket UID, ID and NO.
Since Ticket NO and ID are only attribued on Ticket Closing, it doesn’t have one(am I assuming right here?)
So I want tu use Ticket UID. So i store UID in a program setting.

The workflow is that the script of “Credit Card call” when it’s done is going to write the result of the payment process in a file. This file I check with file monitor device.
The File monitor device triggers fine and right, but the Load Last Ticket Action seems not to wrok correctly…

The actual and the Stored Ticket uid seem not to be the same…

Do you think that this can even work like this? Or should I change somehow the workflow?

Ticket No is assigned instantly before Ticket is closed. Only Ticket ID is assigned on ticket closed.

I am confused with why you are doing this for a payment?

Credit Card call script can also return an error to the file which is monitored and then there is a message which appears that Payment is not done. ( ‘{CALL:test.test()}’ == ‘2’ )

So why are you doing this for payment? Is it triggered from payment screen? Are you doing some kind of integration?

Video CC
It works fine with entities…

You can use save ticket action and it will generate ticketid. Maybe fire it when settle button pressed?

Gonna try this out tomorrow morning thanks!

Hello, tried like this:
And here is what the message shows.

Am I using save ticket action the wrong way?

What event are you using this on?

Automation Command Executed (like in the very first picture)

You may need to split it to two rules.