1b.app
Link copied -

Synchronization of CRM statuses with PrestaShop statuses

I live. Winykla need to change the status of the application in Prestashop to the status of the application in CPM.
API key was generated, rights were granted (in the press to get, put, post), connected to the CRM, on the first stage (it was done to re-verify the visibility... https://nosorog.crm-onebox.com/admin/customorder/order/ 18016/edit/) fixed the Prestashop status sync...however, a pardon is due (screenshot at the attachment).
Could you explain how the synchronization works?
In the CRM, it is necessary to move to the first stage and is it possible to change the status in the prestige?
Original question is available on version: ru

Answers:


Vasil Yuriyovich wrote:
Could you explain how the synchronization works?
In the CRM, it is necessary to move to the first stage and is it possible to change the status in the prestige?

Yes.
But now you are getting an error from PrestaShop - I can assume that it is not possible to switch the stage from any to any status. If I understand correctly - you are trying to switch from the status "Submitted" to "Check for Availability" - and PrestaShop shows that this is a bad request.
09.11.2021, 16:11
Original comment available on version: ru

Well ... can your theory be reversed only by tests?)
Sent -> Availability check - this was the last chance. Having tried to transfer "logical" statuses (like a new pledge -> Pending payment by the bank, having tried the custom status from the CRM, transfer it to the custom (creations by me) in the crime).
09.11.2021, 16:59
Original comment available on version: ru


Vasil Yuriyovich wrote:
Well ... can your theory be reversed only by tests?)
Sent -> Availability check - this was the last chance. Having tried to transfer "logical" statuses (like a new pledge -> Pending payment by the bank, having tried the custom status from the CRM, transfer it to the custom (creations by me) in the crime).

perhaps there is an opportunity to clarify this point with Presta's technical support so that we do not invent?)
09.11.2021, 17:00
Original comment available on version: ru

Good afternoon! There is no such possibility... I wanted to use the files of the log file, it is possible there. However, I don’t know where you can fight, tell me?
Having tested all possible statuses - however, a pardon wins.
If you don’t need to think about it, check the Update Prestashop status checkbox) if you put it - the status of the crm is transferred to the presta, and if you pick it up, then it’s all right to deactivate the dialog when you go to the stage)
10.11.2021, 11:05
Original comment available on version: ru


Vasil Yuriyovich wrote:
Good afternoon! There is no such possibility... I wanted to use the files of the log file, it is possible there. However, I don’t know where you can fight, tell me?
Having tested all possible statuses - however, a pardon wins.

It's a pity...
There is no logging by default - I can provide you with an example of a request to change the status for the specified process, if necessary.

Vasil Yuriyovich wrote:
If you don’t need to think about it, check the Update Prestashop status checkbox) if you put it - the status of the crm is transferred to the presta, and if you pick it up, then it’s all right to deactivate the dialog when you go to the stage)

otherwise, once a minute updates the current status of the processes that are in Prestashop at this stage
that is, by default, statuses are updated with us, otherwise - from us on Prestashop
10.11.2021, 14:46
Original comment available on version: ru

Please be kind. Bo didn’t realize that I’m working in a wrong way, it’s possible to help the butt.
11.11.2021, 10:19
Original comment available on version: ru

In the options, instead of [key], there should be an integration key (deleted so as not to show on the forum):
URL: https://nosorog.net.ua//api/orders/37896
cURL_options:
CURLOPT_HEADER=> 1
CURLOPT_RETURNTRANSFER => 1
CURLINFO_HEADER_OUT => 1
CURLOPT_HTTPAUTH=> 1
CURLOPT_USERPWD => [key]:
CURLOPT_HTTPHEADER=> Array
(
[0] => Expect:
)
CURLOPT_SSL_VERIFYPEER =>
CURLOPT_SSL_VERIFYHOST =>
CURLOPT_CUSTOMREQUEST=> PUT
CURLOPT_POSTFIELDS => <?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<order>
<id>37896</id>
<id_address_delivery xlink:href="https://nosorog.net.ua/api/addresses/108563">108563</id_address_deliv...
<id_address_invoice xlink:href="https://nosorog.net.ua/api/addresses/108563">108563</id_address_invoi...
<id_cart xlink:href="https://nosorog.net.ua/api/carts/124998">124998</id_cart>
<id_currency xlink:href="https://nosorog.net.ua/api/currencies/1">1</id_currency>
<id_lang xlink:href="https://nosorog.net.ua/api/languages/1">1</id_lang>
<id_customer xlink:href="https://nosorog.net.ua/api/customers/106463">106463</id_customer>
<id_carrier xlink:href="https://nosorog.net.ua/api/carriers/11">11</id_carrier>
<current_state xlink:href="https://nosorog.net.ua/api/order_states/1">1</current_state>
<current_state_name not_filterable="true">Awaiting receipt payment</current_state_name>
<module>check</module>
<invoice_number>19296</invoice_number>
<invoice_date>2021-11-09 14:36:31</invoice_date>
<delivery_number>19263</delivery_number>
<delivery_date>2021-11-09 14:39:15</delivery_date>
<valid>0</valid>
<date_add>2021-11-09 12:52:12</date_add>
<date_upd>2021-11-10 10:44:39</date_upd>
<shipping_number not_filterable="true"/>
<id_shop_group>1</id_shop_group>
<id_shop>2</id_shop>
<secure_key>58ea47ff74565f03a5720ed46e009005</secure_key>
<payment>Cash on delivery</payment>
<recyclable>0</recyclable>
<gift>0</gift>
<gift_message/>
<mobile_theme>0</mobile_theme>
<total_discounts>0.00</total_discounts>
<total_discounts_tax_incl>0.00</total_discounts_tax_incl>
<total_discounts_tax_excl>0.00</total_discounts_tax_excl>
<total_paid>758.00</total_paid>
<total_paid_tax_incl>758.00</total_paid_tax_incl>
<total_paid_tax_excl>758.00</total_paid_tax_excl>
<total_paid_real>758.00</total_paid_real>
<total_products>698.00</total_products>
<total_products_wt>698.00</total_products_wt>
<total_shipping>60.00</total_shipping>
<total_shipping_tax_incl>60.00</total_shipping_tax_incl>
<total_shipping_tax_excl>60.00</total_shipping_tax_excl>
<carrier_tax_rate>0.000</carrier_tax_rate>
<total_wrapping>0.00</total_wrapping>
<total_wrapping_tax_incl>0.00</total_wrapping_tax_incl>
<total_wrapping_tax_excl>0.00</total_wrapping_tax_excl>
<conversion_rate>1.000000</conversion_rate>
<reference>546333744</reference>
<payment_id/>
<payment_order_id/>
<gtm_sent>1</gtm_sent>
<associations>
<order_rows virtual_entity="true" node_type="order_rows">
<order_rows>
<id>210830</id>
<product_id>101478</product_id>
<product_attribute_id>0</product_attribute_id>
<product_quantity>1</product_quantity>
<product_name>70314 Beastmaster's Chaos Chaos</product_name>
<product_reference>OKR020367</product_reference>
<product_ean13>557339</product_ean13>
<product_upc/>
<product_price>698.000000</product_price>
<unit_price_tax_incl>698.000000</unit_price_tax_incl>
<unit_price_tax_excl>698.000000</unit_price_tax_excl>
</order_rows>
</order_rows>
</associations>
</order>
</prestashop>
Answer:
HTTP/1.1 400 Bad Request
Server: nginx
Date: Thu, 11 Nov 2021 15:42:26 GMT
Content-Type: text/xml;charset=utf-8
Content Length: 241
Connection: keep-alive
Vary: Host
Access Time: 1636645346
X-Powered-By: PrestaShop Webservice
PSWS Version: 1.6.0.9
Execution-Time: 0.004
Set-Cookie: PrestaShop-2d6857381ae0c75dab71195c3806f340=uafIl0G48HaqeEhBnV4rrlSz8fCzvewzxgZAiVXPJ2S4w1RpKObrodODB7KP4ZOnQzoETy%2FCx3yGALh12SoU2uJkzrtDQMoP8Q09i%2FCx3yGALh12SoU2uJkzrtDQMoP8Q09i%09i12SoU2uJkDQBMoP8Q09i%09i3YP8X%09i3Y; expires=Wed, 01-Dec-2021 15:42:26 GMT; Max Age=1728000; path=/; domain=nosorog.net.ua; httponly
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<message><![CDATA[Internal error. To see this error please display the PHP errors.]]></message>
</error>
</errors>
</prestashop>
11.11.2021, 17:47
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