1b.app
Link copied -

Business process when ordering

https://vuuoksa-home.crm-onebox.com/
Good afternoon. We want to add a new business process for the site when the user enters data for the order - https://prnt.sc/w263j6
Tried to test today, but it doesn't work.
What they did: created the "Left Contacts" business unit, marked it as Start
The transfer of orders goes through the API, the process name was written in the workflowname, as well as in the statusname
But still, the data was not transferred to CRM after the test data entry. What could be the problem?
Original question is available on version: ru

Answers:

If you are sending a request to the REST API - provide an example request (no login/password, only a link to the user whose access you use to authorize in the API)
14.12.2020, 15:55
Original comment available on version: ru


Tyndyk Maxim Vadimovich
Administrator wrote:
If you are sending a request to the REST API - provide an example request (no login/password, only a link to the user whose access you use to authorize in the API)

I pass the variable like the others
$post_fields['workflowname'] = 'Left contacts';
The rest are transmitted normally, so there is no point in the request body
15.12.2020, 09:59
Original comment available on version: ru


Roman wrote:
$post_fields['workflowname'] = 'Left contacts';

I don’t see where you have created such a business process https://vuuoksa-home.crm-onebox.com/admin/shop/workflow/
15.12.2020, 15:12
Original comment available on version: ru


Tyndyk Maxim Vadimovich
Administrator wrote:

Roman wrote:
$post_fields['workflowname'] = 'Left contacts';

I don’t see where you have created such a business process https://vuuoksa-home.crm-onebox.com/admin/shop/workflow/

https://vuuoksa-home.crm-onebox.com/admin/shop/workflow/12/constructor/
https://prnt.sc/w373zr - maybe I made a mistake and I mean the stage in the BP
While it was turned off for a while
But in fact, it should be the starting one and then go to the "new order"
15.12.2020, 15:17
Original comment available on version: ru


Roman wrote:
https://vuuoksa-home.crm-onebox.com/admin/shop/workflow/12/constructor/
https://prnt.sc/w373zr - maybe I made a mistake and I mean the stage in the BP
While it was turned off for a while
But in fact, it should be the starting one and then go to the "new order"

well duck in the request you do not transfer the name of the status, but the name of the business process.
15.12.2020, 15:20
Original comment available on version: ru

Then what do we need to do, is it enough to switch the starting stage to the BP on the CRM side?
And how then should the request for changing the status in the BP look like?
We get it like this:
1. The user filled in the data -> "Left contacts"
2. Paid -> now the status is "New order"
15.12.2020, 15:42
Original comment available on version: ru


Roman wrote:
1. The user filled in the data -> "Left contacts"

Send a request to create a process in this status (you can not send the status if it is a start one)

Roman wrote:
2. Paid -> now the status is "New order"

use the API for changing the status of an order, or updating an order (by passing a new status there)
15.12.2020, 15:48
Original comment available on version: ru

We tried to test a new version.
Separately prescribed both workflowname and statusname
As with that and with that option, the data does not go to the CPM.
$post_fields['statusname'] = 'Left contacts';
and
$post_fields['workflowname'] = 'Left contacts';
Our initial working PSU is this - https://prnt.sc/w3r3y6
We are trying to change to this one - https://prnt.sc/w3r4hr
16.12.2020, 10:28
Original comment available on version: ru



Tyndyk Maxim Vadimovich
Administrator wrote:

https://vuuoksa-home.crm-onebox.com/api/orders/add/ and update
16.12.2020, 15:56
Original comment available on version: ru


Roman wrote:
update

without a full request, we play "guessing games"
in api /api/orders/update/ you can directly pass the identifier in the statusid parameter
16.12.2020, 16:01
Original comment available on version: ru

array
(
[login] => restapi
[password] =>
[clientnamefirst] => test
[clientphone] => +7 (777) 777-77-77
[ordercode] => 10489
[sum] => 495
[statusname] => Left contacts
[utm_source] =>
[utm_medium] =>
[utm_campaign] =>
[utm_content] =>
[utm_term] =>
[source] => https://vuoksa-home.ru/order/
[productArray] => Array
(
[0]
(
[id] => 20
[name] => Shirt fabric, p/linen, "Dusty Rose"
[price] => 495
[count] => 1.0
)
)
)
16.12.2020, 16:21
Original comment available on version: ru

https://vuuoksa-home.crm-onebox.com/api/orders/update/?login=restapi&passwor... %D1%81%D1%82%D0%B0%D0%B2%D0%B8%D0%BB+%D0%BA%D0%BE%D0%BD%D1%82%D0%B0%D0%BA%D1 %82%D1%8B&utm_source=&utm_medium=&utm_campaign=&utm_content=&utm_term=&source=https%3A%2F%2Fvuoksa-home.ru%2Forder%2F&productArray%5B0%5D%5Bid%5D=20&productArray%5B0%5D%5Bname%5D =%D0%A2%D0%BA%D0%B0%D0%BD%D1%8C+%D1%81%D0%BE%D1%80%D0%BE%D1%87%D0%B5%D1%87% D0%BD%D0%B0%D1%8F%2C+%D0%BF%2F%D0%BB%D0%B5%D0%BD%2C+%22%D0%9F%D1%8B%D0%BB%D1% 8C%D0%BD%D0%B0%D1%8F+%D1%80%D0%BE%D0%B7%D0%B0%22&productArray%5B0%5D%5Bprice%5D=495&productArray%5B0%5D%5Bcount%5D= 1.0
16.12.2020, 16:21
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