1b.app
Link copied -

Values are not generated correctly using the formula [cdatetime|y]-[workflow.number]

Есть вопросы по работе системы?
Создайте топик на форуме и вам помогут в решении! Создать топик на форуме
Good afternoon. There was a problem with generating the value in the additional field, we generate it by the [cdatetime|y]-[workflow.number] variable, using the action Fill in the process or contact field, that is, the numbers must be formed in a row within the same process, and quite recently it was, here a list of orders from a week ago http://joxi.ru/Q2KZbe7HyZ7Ram, and now they are generated with missing values http://joxi.ru/YmE5byDuB5kxBm. Please check and correct
Original question is available on version: ru

Answers:


By chance, these processes are not deleted, which are skipped?
For this is possible when the number by [workflow.number] has already been assigned to the process and then the next one was used (and the processes were deleted / rolled back due to an error that was not within the scope of the number assignment).
19.10.2021, 18:30
Original comment available on version: ru

pointwise processes can be deleted, but not in such quantity, 1 out of ten is deleted, and here spaces are everywhere. Here are the newly created orders no one could delete at that time
19.10.2021, 23:16
Original comment available on version: ru


Shatokhina Irina wrote:
pointwise processes can be deleted, but not in such quantity, 1 out of ten is deleted, and here spaces are everywhere. No one could delete newly created orders at that time

repeated transitions to a stage with a customized action?
20.10.2021, 17:48
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production
Administrator wrote:

Shatokhina Irina wrote:
pointwise processes can be deleted, but not in such quantity, 1 out of ten is deleted, and here spaces are everywhere. No one could delete newly created orders at that time

repeated transitions to a stage with a customized action?

Good morning. We assign a value and do not overwrite it anymore. The only point where we can change the order number if this value is duplicated is the settings , that is, if the order number was generated twice with the same value, we change it.
Here are the morning ones http://joxi.ru/12MRbejTw54XMA, no one has touched them yet, they were created by api and that's all, according to the order history, after which a gap of 10 values was assigned and did not change. The next order was also assigned a value and did not change
21.10.2021, 09:12
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
I think the problem is that when a process is created, if there is an error in the response for the first action, then the number is still generated, but is not written anywhere. Because of this, there are gaps. Or even if it's not a starting one, then all the same, if you get an error during the transition, the number is generated, and not written down.
The same problem is observed in other functions
21.10.2021, 11:43
Original comment available on version: ru


Sukhanitsky Andrey
Integrator
Integrator CRM wrote:
I think the problem is that when a process is created, if there is an error in the response for the first action, then the number is still generated, but is not written anywhere. Because of this, there are gaps. Or even if it's not a starting one, then all the same, if you get an error during the transition, the number is generated, and not written down.
The same problem is observed in other functions

Andrey, I agree that this may be so, but why are there gaps in 10 values? I don’t think that 10 api errors in a row are possible or when replacing a double, regenerate the number 10 times
If a double - they regenerated and a pass in one digit - which is ok. Also, when creating by api, there is an attempt to create - an error, a pass in one / two numbers, but not in 10
21.10.2021, 12:25
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Shatokhina Irina wrote:

Sukhanitsky Andrey
Integrator
Integrator CRM wrote:
I think the problem is that when a process is created, if there is an error in the response for the first action, then the number is still generated, but is not written anywhere. Because of this, there are gaps. Or even if it's not a starting one, then all the same, if you get an error during the transition, the number is generated, and not written down.
The same problem is observed in other functions

Andrey, I agree that this may be so, but why are there gaps in 10 values? I don’t think that 10 api errors in a row are possible or when replacing a double, regenerate the number 10 times
If a double - they regenerated and a pass in one digit - which is ok. Also, when creating by api, there is an attempt to create - an error, a pass in one / two numbers, but not in 10

Maybe something else, that's just when your order is loaded from some site or API.
Try to separate these actions, separately checking, and separately generating a number
21.10.2021, 12:49
Original comment available on version: ru


Sukhanitsky Andrey
Integrator
Integrator CRM wrote:
Try to separate these actions, separately checking, and separately generating a number

I don't understand what test you are talking about? If you are talking about checking for duplicates, so it is at a manual stage, that is, at the start, only the number is generated, and then when the order is taken into work (the employee clicks with his hands), there is a check for duplicates and an update if a duplicate is found
In addition, such settings (number generation and checking for duplicates) were made a long time ago, and the problem with spaces in the numbering appeared only now
Regarding sending api requests and what's with the answers from the admin, I'm waiting
21.10.2021, 13:18
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
there is a difference of 100+ processes between these orders
If you look, the previous ones go in order, that is, this is not a pattern.
And now just filter out remote orders and see how many of them are between these code values.
21.10.2021, 16:13
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
Here's another thought to think about. Do you have the order creation pre-page disabled? If yes, then even when you accidentally opened the page for creating an order, it has already been created, but until you save it, it will be deleted.
21.10.2021, 16:14
Original comment available on version: ru


Sukhanitsky Andrey
Integrator
Integrator CRM wrote:
And now just filter out remote orders and see how many of them are between these code values.

among the remote there is none between these process id
and when creating a process and blocking the creation (for example, an api error), the process itself is not created, but do the actions of the starter have time to work out?
21.10.2021, 16:26
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license

Shatokhina Irina wrote:
and when creating a process and blocking the creation (for example, an api error), the process itself is not created, but do the actions of the starter have time to work out?

it can simply reserve a number for it, as often happens with importing orders from other services if an error occurs during creation. I think it's the same here.
21.10.2021, 16:38
Original comment available on version: ru


Shatokhina Irina wrote:
and when creating a process and blocking the creation (for example, an api error), the process itself is not created, but do the actions of the starter have time to work out?

if there is an error in the REST API, the results of the actions will be rolled back (except for physical manipulations with the file system)
although there may be exceptions due to action conflicts
Actually there are several options:
1. re-forming numbers
2. change of BP with a further change of number
3. remote processes
etc.
In this case, I would like to understand after performing what actions the number is already used in the system, but there is no process with it (where the process is created).
21.10.2021, 16:42
Original comment available on version: ru

Maxim, the above processes were created at night / in the morning only by API, they did not have time to do anything with them. The settings are done like this. Using the order add method, we create a process at the stage https://crm.ohrana.ua/admin/shop/workflowstatus/367/action/new/ is being filled, here the number is assigned by the action . Then there are two options for events, either the order is filled in by the client on the site and an update of the process arrives in the box with the stage changed to Order from the site (the order number does not change, there are no actions associated with this field at the stage), or after 5 minutes the process stage in the Box switches to the stage Order from the site (the same stage, that is, there is no action with the additional field Order number).
That is, when creating a value using api already with spaces, there is an assumption that when you try to create using api and receive an error (not receiving a response), the actions of the start work out and because of this, spaces
21.10.2021, 17:00
Original comment available on version: ru


Shatokhina Irina wrote:
That is, when creating a value using api already with spaces, there is an assumption that when you try to create using api and receive an error (not receiving a response), the actions of the start work out and because of this, spaces

Are there any examples of requests for which an error occurs and the number is iterated irrevocably?
22.10.2021, 16:01
Original comment available on version: ru

Good morning. All the same, when sending a request to create an order and receiving an error, a number is generated, checked like this:
Orders were created through the site, that is, they came to the box via api. After creating the first order 21-107352 from the site, I send a request to create an order
https://crm.ohrana.ua/api/orders/add/?login=LOG&password=PAR&clientphone...
Given that such an external id is already in boxing, I get the error http://joxi.ru/eAOObe1f6B0yKA. I create a second order from the site - an order with the number 21-107354 arrives in the box, that is, one number is missing.
Again I send the above request to create an order with the same external id three times in a row, then again I create an order from the site and 21-107357 is created in Box, that is, three passes
Please fix this
26.10.2021, 09:57
Original comment available on version: ru


Shatokhina Irina wrote:
Given that such an external id is already in boxing, I get the error http://joxi.ru/eAOObe1f6B0yKA.

This error is thrown even before an attempt to create a process, in fact, there is no launch of actions ...
Even if there was an error during process creation - all this happens within a transaction, the data would be rolled back...
Please give a link to the contact, under whose REST API access you are sending a request - I will personally check and try to figure out where the problem is.
26.10.2021, 17:03
Original comment available on version: ru


Tyndyk Maxim Vadimovich
OneBox production
Administrator wrote:
This error is thrown even before an attempt to create a process, in fact, there is no launch of actions ...
Even if there was an error during process creation - all this happens within a transaction, the data would be rolled back...

this is scary

Tyndyk Maxim Vadimovich
OneBox production
Administrator wrote:
Please give a link to the contact, under whose REST API access you are sending a request - I will personally check and try to figure out where the problem is.

under the access of this employee, run https://crm.ohrana.ua/admin/shop/users/75068/
Thanks
26.10.2021, 17:22
Original comment available on version: ru


Shatokhina Irina wrote:
under the access of this employee, run https://crm.ohrana.ua/admin/shop/users/75068/

Original number 108750
I make 10 requests (mentioned above), for each I get an error {"result":"fail","errors":["Order is already!"],"errorText":false}
Number remains 108750
Let's do it differently - I added logging in the specified action in the place of rewriting the number - indicate from the current moment which number will be skipped - I will check for which process and where it was recorded.
At the time of adding the logs, the number was 108757 for BP=16
27.10.2021, 17:16
Original comment available on version: ru

Good morning. Gaps between all values after the you specified, for example, order 21-108764 followed by 21-108770
28.10.2021, 09:22
Original comment available on version: ru


Shatokhina Irina wrote:
Good morning. Gaps between all values after the one you specified, for example, order 21-108764 followed by 21-108770

It seems like I found the cause of the error.
Test if everything is OK?
28.10.2021, 17:03
Original comment available on version: ru

Thanks, I'll follow up
28.10.2021, 17:14
Original comment available on version: ru

Save me, now it's and I can't reissue the number, it doesn't change
28.10.2021, 17:20
Original comment available on version: ru

in procedure on click action https://crm.ohrana.ua/admin/shop/workflow/16/procedure/619/?status=0
https://crm.ohrana.ua/admin/customorder/zakaz-klienta/2361886/edit/ process even cleared the field but
now I can’t write any value in this field at all, please correct the work has stopped
28.10.2021, 17:23
Original comment available on version: ru

Redesigned the logic of the action - now the fields are checked for fullness before changing the variables in the formula.
Check if your problem is solved?
01.11.2021, 14:46
Original comment available on version: ru

Maxim, good afternoon
Spaces are still repeated ,
02.11.2021, 13:10
Original comment available on version: ru

Everything, I caught the conflict in the logic of this action completely.
I checked, it should not be repeated with this action.
02.11.2021, 17:02
Original comment available on version: ru

So far, everything is fine, today I track until the end of the day, and if everything is ok, I will close
04.11.2021, 10:14
Original comment available on version: ru

everything is fine, close
08.11.2021, 16:27
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment