APIs & Integrations

aemmi
Teilnehmer/-in

moving from pending to abandon

lösung

I've created a deal using the API end point 

http://api.hubapi.com/extensions/ecomm/v1/sync-messages/DEAL

with the following data 

 [
  {
    "integratorObjectId": "1176522_26297553",
    "action": "UPSERT",
    "changeOccurredTimestamp": 1551890582,
    "propertyNameToValues": {
      "stage": "checkout_pending",
      "order_id": "26297553",
      "customer_id": "1176522",
      "order_total": "32.50"
    } 
    }]

The deal gets created in the pending stage but after a few minutes it automatically gets moved to the Abandon stage.  In the documentations ir reads Note: When using the Ecommerce Bridge API, deals that go into the pending state are automatically moved to abandoned 24 hours later.  

How does it determine the 24 hours. or does our app have a different setting other than 24 hours

 

0 Upvotes
1 Akzeptierte Lösung
IsaacTakushi
Lösung
HubSpot Employee
HubSpot Employee

moving from pending to abandon

lösung

Hi, @aemmi.

 

Thank you for that information.

 

The 24 hour period appears to be calculated based on the  "changeOccurredTimestamp" value.

 

You passed "changeOccurredTimestamp": 1552057447, which is 18 January 1970 at 18:07 (UTC-5:00), since it is not a properly-formatted millisecond timestamp. Per this article, HubSpot uses UNIX millisecond timestamps. Since 18 January 1970 is more than 24 hours old, HubSpot immediately moved the deal tocheckout_abandoned.

 

Incorrect timestamp.jpg

 

To make1552057447 into a millsecond timestamp, add 000 to the end to make1552057447000. This timestamp refers to 8 March 2019 at 10:04 (UTC-5:00).

Isaac Takushi

Associate Certification Manager

Lösung in ursprünglichem Beitrag anzeigen

4 Antworten
IsaacTakushi
HubSpot Employee
HubSpot Employee

moving from pending to abandon

lösung

Hi, @aemmi!

 

I would expect the 24 hours to be calculated from the object's createdate.

 

I'd like to investigate the deals exhibiting this behavior, though. Could you share some links to deals which moved to checkout_abandoned within minutes?

Isaac Takushi

Associate Certification Manager
0 Upvotes
aemmi
Teilnehmer/-in

moving from pending to abandon

lösung

Ho Issac @IsaacTakushi.,

 

Just entered one a few minutes ago.  Here's the link.  It's already in the abandon stage

https://app.hubspot.com/contacts/3977210/deal/602043213/?interaction=note

This is what I posted

[
  {
    "integratorObjectId": "1179490_26297553",
    "action": "UPSERT",
    "changeOccurredTimestamp": 1552057447,
    "propertyNameToValues": {
      "stage": "checkout_pending",
      "order_id": "26297553",
      "customer_id": "1179490",
      "order_total": "32.50"
    } 
    }]

Thank You

0 Upvotes
aemmi
Teilnehmer/-in

moving from pending to abandon

lösung

Hi Issac @IsaacTakushi.,

 

I'm trying to retest this I sent a sync message

 

 [
  {
    "integratorObjectId": "1269839_25900077",
    "action": "UPSERT",
    "changeOccurredTimestamp": 1552071120000,
    "propertyNameToValues": {
      "stage": "checkout_pending",
      "order_id": "25900077",
      "customer_id": "1269839",
      "order_total": "8.29"
    } 
    }]

and received a 204 No Content as expected.  I went to check the sync status with 

 

 

 http://api.hubapi.com/extensions/ecomm/v1/sync-status/DEAL/1269839_25900077

and i received a response of 

{"status":"error","message":"No sync messages found.","correlationId":"82a3701f-4739-4766-a8bf-60f9969b716b","requestId":"704938c2075e29f935b92bdc6ac030a2"}

I'm also getting the same behavior when I send a CONTACT sync message.

 

Can you see what I'm doing wrong

 

Thank You

 

 

 

0 Upvotes
IsaacTakushi
Lösung
HubSpot Employee
HubSpot Employee

moving from pending to abandon

lösung

Hi, @aemmi.

 

Thank you for that information.

 

The 24 hour period appears to be calculated based on the  "changeOccurredTimestamp" value.

 

You passed "changeOccurredTimestamp": 1552057447, which is 18 January 1970 at 18:07 (UTC-5:00), since it is not a properly-formatted millisecond timestamp. Per this article, HubSpot uses UNIX millisecond timestamps. Since 18 January 1970 is more than 24 hours old, HubSpot immediately moved the deal tocheckout_abandoned.

 

Incorrect timestamp.jpg

 

To make1552057447 into a millsecond timestamp, add 000 to the end to make1552057447000. This timestamp refers to 8 March 2019 at 10:04 (UTC-5:00).

Isaac Takushi

Associate Certification Manager