APIs & Integrations

udayapitchika
Member

Portal specific settings API for application development

Property mappings in /settings endpoint for application development is appId specific - /extensions/ecomm/v1/settings?appId={appId}

This would work if all our customers fit into common property mappings for the app. However, we have a use case to optionally provide additional fields sync along with the common fields. If needed, our customers should be able to choose any property from eCommerce platform and map it to a custom field in HubSpot.

To achieve this, we are thinking of this high level strategy -

  1. If there are any additional fields to sync, we first use v1 contacts API and create the contact with additional fields - 'contacts/v1/contact/createOrUpdate/email/:contact_email'
  2. And then, do a PUT request to sync-message endpoint to sync all the common fields using ECommerce bridge API.

The probelm with this approach is, when a new contact record is created in HubSpot, it may not have all the property values. This requires adding additional delays or adding additional conditions in the workflows to make sure all the field values are available in HubSpot.

Also, our app needs to know when all the field values are available in HubSpot to do some additional tasks.
We could look for webhooks and find out when a contact/deal is created/updated but there is another caveat with webhooks that I described here -

Is it possible to add integratorObjectId property to HubSpot webhooks if a contact/deal is created/updated through ECommerce bridge API? When we POST a sync-message the immediate response we see is HTTP 204 but we don't know when the contact actually syncs into HubSpot. Our app needs to know when a contact/deal is actually created/updated in HubSpot to do some additional tasks. We are subscribed to contact & deal webhooks but there is no reference of which contact/deal in our database is creat…

Our strategy seems a bit cumbersome, Is there any better alternative that you could suggest us to support additional mappings?

We know that we could use individual portal's API key and create settings for that portal itself but it would be a lot useful if the same option is available for application development too.

Something like - /extensions/ecomm/v1/settings?appId={appId}&portalId={portalId}
If a portal ID is used, those settings are specific to that portal, if not those are common settings for the app and for all portals.

0 Upvotes
6 Replies 6
udayapitchika
Member

Portal specific settings API for application development

To give more perspective, We would like to build various shopping cart integrations using a single HubSpot app.

It is difficult to fit data from vairous shopping carts into a single mapping model and we may run into issues like -

  1. Some shopping carts provide additional information/custom fields that we would like to sync into HubSpot which will not fit into existing model
  2. Some customers want to change the default mappings and sync data into some other custom fields
0 Upvotes
udayapitchika
Member

Portal specific settings API for application development

Thanks for replying @Sean_Duane, your understanding is correct. That's exactly what I want.

0 Upvotes
sduane
HubSpot Product Team
HubSpot Product Team

Portal specific settings API for application development

Ahh alright, that makes sense, thank you.

There is currently no way to do what you ask, nor is this anywhere on our roadmap.

We have considered the idea of letting customers define their own custom mappings, to obtain extra info from their ecomm store, in addition to what the app defines. However, that would be up to the user, not the application.

We would love to learn more about your use case on this. I'm tagging @dskim @Mark_Hazlewood so we can try to learn more about it.

Otherwise, I don't have a great suggestion. Perhaps just adding the field mappings to the app settings, even if they will be used by a few portals, is an option?

0 Upvotes
udayapitchika
Member

Portal specific settings API for application development

Thanks @Sean_Duane.

I appreciate your suggestion but managing portal specific field mappings at app level will become unreasonable over time. Also, we have no control over the naming convention of custom fields across various shopping carts.

For now, we will proceed with our approach and see if that works. I'm happy to provide more information on our use case to @dskim & @Mark_Hazlewood. Can I DM them ?

0 Upvotes
sduane
HubSpot Product Team
HubSpot Product Team

Portal specific settings API for application development

@udayapitchika

At some point after the official release of EcommBridge i'll start pushing to reach out to developers working with us, and get feedback (A questionnaire or an interview).

If you want to provide more info until then, yeah, DM either me or danny

-Sean

0 Upvotes
sduane
HubSpot Product Team
HubSpot Product Team

Portal specific settings API for application development

udayapitchika,

Hmm.. I want to clarify a bit here. I think what you're saying is the following:

  • You have an Application that uses ECommBridge
  • Thus, you have ecomm settings that are for that app
  • e.g. /extensions/ecomm/v1/settings?appId={yourAppId}
  • On some portals, you expect the user to install your app, but want extra field mappings
  • Thus your suggestion is to allow a way to add more field mappings for your app but only for specified portals

Is my understanding correct?

(Aside: I replied to your other post about integratorObjectId)

-Sean

0 Upvotes