incorrect contact coming back when getting contact by hubspotutk cookie
Our application uses the ecommerce bridge API, and we're finding that contacts upserted through it are not properly retrievable using the standard API call to get a contact by the value in the hubspotutk cookie.
/contacts/v1/contact/vid/:vid/profile using the vid returned in #2 yields a json payload that has is-contact: false in it, and none of the expected properties (email, etc.) are present.
5. Meanwhile, the contact that was originally upserted in step 1 can be found in the Hubspot admin panel, but it has a different contact id.
incorrect contact coming back when getting contact by hubspotutk cookie
Yes, in step 2 we are passing the hubspotutk cookie value stored in the browser of the user.
As for comparing the object id, I'm a little lost. Unless I am mistaken, the call to
PUT /extensions/ecomm/v2/sync/messages doesn't return a value that is comparable to vid. It returns the externalObjectId, but in our case this is simply the user's email.
FWIW, the vid/contact id in my steps 4 and 5 are different.
incorrect contact coming back when getting contact by hubspotutk cookie
Here is another restatement of the problem we are having:
We need to be able to create a deal inHubspotand assign it to an existing user when the only identifying information we have at the time items are added to the shopping cart is the hubspotutkcookie. Otherwise, we have to do one of two things:
(1) update ourecommerceworkflowto require an email before an item is added to the cart.
(2) not have any deals in HS until the consumer has progressed further in the checkout process and has entered their email address, which for us is the payment page itself.
Our hope was to grab the value of theutkcookie, get a reference to the current user, and then use the email address of the user as theexternalobjectid for the contact when we create the deal.
Is the problem that I'm trying to use customer email as theexternalobjectid? What would the harm be in using our unique cart ID (aguid) as theexternalobjectidfor the contact recordupsert? It would uniquely identify the user during the life of the current order. In the future, a subsequent cart interaction for the same customer would have a different cart ID. Would this present a problem?