I have successfully mapped all my properties for Deals and Contacts.
Now have completed all my sync message handling in my app and they all work. Deal stages can be changed, etc. The only problem now is that when I add a new Pipeline Stage to the Ecommerce Pipeline it's not recognized in the Ecommerce Bridge API sync message api.
The pipeline stage I have tried to add is checkout_errored. That's the internal id for the stage I created. When I try to use this in a sync message I get:
As an additional note, if I edit the cancelled stage the behavior in the Deals UI changes, instead of the empty dots in the "stage bar" it's checkmarks all the way through. I just re-installed the Ecommerce Bridge settings via the API and everything returned to normal.
So now I am suspicious that there is some special mapping that occurs between ECommerce Sync API <==> Deals API. Is there a way to add a deal stage that I can sync to through the ECommerce Bridge API Sync Message?
I stumbled across this post, looking for the same kind of solution re: programmatic use of customised deal stages for Ecommerce Bridge.
While the problem that you encountered in 2019 seems to have remained unchanged, I've tested and confirmed a workaround that might be of interest to others. It enables you to use custom Ecommerce deal stages, while still referencing external system record IDs:
Create a new deal stage within the auto-created "Ecommerce" Deal pipeline (HubSpot Web UI > Settings > Objects > Deals > Pipelines > "Add a deal stage" (take note of the "Internal id" generated after you create the deal stage)
Create a new property via the "Create a property" API endpoint (it's important you do this via the API, not the web UI). This will be used to store your external Deal / order record IDs.
Be sure to set the hasUniqueValue field to true, as per instructions under the "Creating your own unique identifiers" heading on this HubSpot API doc. This will enable you to update Deal records using your external record IDs (as is the standard when using Ecommerce Bridge).
Note that the hasUniqueValue property setting can only be configured at the time of property creation (i.e. you can't update an existing property's hasUniqueValue setting)
Populate the newly created property with data for all relevant Deals (lots of options to do this --> e.g. via Ecommerce Bridge send sync messages, CSV upload, HubSpot workflow, manually in web UI etc.). Also, consider adjusting your continuous sync to account for this new property.
Finally, use HubSpot's CRM API to move any relevant Ecommerce Deals into your custom deal stage, using the external system ID property you created in Step 2 (i.e. rather than the internal HubSpot record ID). You can do this via the "Update" Deals API endpoint. For example:
@zaklein Thank you so much for the lengthy and clear instructions. Sorry I wasn't able to check this out until now. I'll need to crack open the project and see if I can implement it. This solution does look good though.
I'm so sorry for dropping the ball on this, @gillytech. Please be sure to tag me with @IsaacTakushi in future messages so I don't miss anything.
@gillytech and @Zibi, at this time, the Ecommerce Bridge does not support custom dealstage values.
Per the Automatic account setup section of this article, all deals created through the Ecommerce Bridge must be placed in one of the six default deal stages:
checkout_abandoned
checkout_pending
checkout_completed
checkout_completed
processed
shipped
cancelled
Apologies for the inconvenience and confusion around this.
Hey @IsaacTakushi thanks for getting back to us on this. I have moved on since this problem was encountered. It's a shame that custom stages wasn't part of the feature set of ecommerce bridge. If we can get that in as a feature request I would be much obliged
@Zibi, Unfortunatley no, I wasn't able to solve this. Basically making due with what we got on the default stages.
You got it wrong but that's ok. Lets go over this again so we're both on the same page.
I am not trying to create a deal stage with a sync message. I tried both methods of creating the deal stage checkout_errored. One was through the UI which gave me a UUID (the long 36 character alnum string) and I also tried using the CRM Pipelines API. I successfully created the new deal stage both times.
And both times, I tried to move a deal into the checkout_errored stage (or the equivalent UUID identifier) using the ecomm sync message API and both times I got back the aforementioned error. That the deal stage ___ was not valid for our portal.
To me I think this is simply an engineering issue. My concept of the problem is that there is a missing mapping between what I am submitting and what is getting through ECommerce Bridge. Do you follow?
For instance, I need to map my properties between my app's fields and the filed names in HubSpot (for Contacts, Deals, Products, etc), right? And I think when you install the ECommerce Bridge in the portal you get the predefined deal stages installed and already mapped. So is there a way to map the new deal stage within ECommerce Bridge?
You should do some testing on that and let me know your conclusion and how we're going to handle it.
If so, this is not possible to do with a sync message, which can only manipulate CONTACT, DEAL, PRODUCT, and LINE_ITEM objects — not pipeline objects.
I see two options to modify the Ecommerce Pipeline in a given account:
Add the stage manually in the UI, but you'll then have to use this endpoint with the deals object type to see the stage's internal name, as it won't be checkout_errored, but a long alphanumeric string.
Use this CRM Pipelines API endpoint where you can add a "Checkout Errored" stage to the Ecommerce Pipeline and set its internal name to checkout_errored.
If I'm misunderstanding you and you're simply trying to move a deal into the checkout_errored deal stage with a sync message, you're receiving that error because your Ecommerce Pipeline currently has no stage with that internal name. I only see five stages, none of which are named "Checkout Errored."