Notify Hubspot associations changes - api

I have created a private app which notify our platform about contacts, companies and deals changes by configuring a subscription in webhooks.
How can i notify associations changes too? For example, notify when a company is associated with a contact. I think it's not possible with the webhooks API.
I need these notifications in order to keep both platforms in sync.
I have configured a private app but it is not possible to configure a subscription in webhooks for associations

Now i have a solution.
I have created a calculated property (named "version") which count all registers associated with an object which have "Record Id". Each time an association is created / deleted, this property modifies its value.
Then i have subscrive the change event of this property "version" on webhooks (private app). Each time an association is created / deleted, a notification is sended because the change in the total value of "version".

Related

For a Shopify App, should we be using 'shop_id' or 'shop_url' to keep track of user accounts?

For a Shopify App, should we be using 'shop_id' or 'shop_url' to keep track of user accounts?
The 'shop_url' account is easily accessible, but I'm wondering if this is a reliable field (does the shop_url every change if a user attaches a domain name or contacts suppport?). There is also a 'shop_id' variable but it seems to require extra API calls and makes me question if I should be using 'shop_id' or 'shop_url'. How do other Shopify App developers keep track of their customer accounts? Do you use the 'shop_url' as the 'key' in your database?
Everyone without fail will use the store name. That combo *.myshopify.com. It is unique to a store, and is handed to every call made to an App. shop=drunkmonkey.myshopify.com for example. No ID. Nothing else is used, just that parameter.

Cloudkit new record notification

I am about ready to update my app with CloudKit new record notifications. before I publish it should I delete the subscription I used to test it?
You can delete it, yes. But if you are asking this question, you might be overlooking something with subscriptions.
I always create CloudKit subscriptions programmatically in my app when it starts up (through a method called from didFinishLaunchingWithOptions). I set a static name for the notification like taskNotification for each recordType so that the same subscription gets overwritten with each app launch.
This is useful because this code will run for every user on every device so that their devices gets registered to receive the notifications.
It also ensures the subscriptions get created in the Production environment on CloudKit after you migrate to it.
If you are manually creating and deleting CloudKit subscriptions, you may not be allowing your users to subscribe their devices properly. Just thought I'd point that out.
Good luck!

Unregister tags with Azure Service Bus Notification Hubs

I have inherited an iOS app that uses Azure Notification hubs to send notifications, however there is a snag.
The users select multiple categories for which to receive notifications (News, Sports, etc), and they can change these at any time. Whenever they add or delete an interest the app unregisters from the notification hub and subscribes with the new tags.
I thought that this was incorrect, but I can't find a way to see what tags a user is subscribed to, or add/delete a single tag.
In the current app, sometimes our test devices don't receive notifications that I think they should.
I've found answers online saying that you should avoid unregistering, and that there is a delay to register and unregister (such as the answer here, Android Azure Notification hub unregister)
I am looking for any insight on how to handle this usecase, of adding and deleting tags.
Since you didn't specify how you are communicating with the Azure Notification Hub, I will use the ANH REST API as reference.
"...I can't find a way to see what tags a user is subscribed to..."
If you request a registration (e.g. per registration ID), you will get the registration data including the assigned tags.
"...or add/delete a single tag."
You don't add or delete single tags directly on the registration in ANH, you basically update the whole registration, if necessary. Some ANH SDKs may have convenience methods for this, but in general, you just send the complete registration object with the desired tags to ANH and it gets overwritten. E.g. the REST API has an "Update Registration" method, but no "Add/Remove Tag" methods.
"I've found answers online saying that you should avoid unregistering, and that there is a delay to register and unregister..."
You should indeed not unregister and register for this use case because of the reasons you stated. This is probably also the reason for:
"In the current app, sometimes our test devices don't receive notifications that I think they should."
Never unregister and register again for updating a registration. Only unregister, if you don't want to receive notifications at all on a specific device.
"I am looking for any insight on how to handle this usecase, of adding and deleting tags."
Basically, just omit the "unregister step" and make the "register step" a "create or update registration step" using the actual ANH registration ID and all desired tags.

How to build a jabber client using libstrophe

I'm trying to make a simple Jabber client using the libstrophe library.
It's going fairly well so far, except for one thing for which I need some clarification.
Namely, how am I supposed to (continuously) know the status (i.e., Online/Offline) of contacts, so that I can display it to the user of my program? Similarly, how am I supposed to request the roster of the user?
I've looked at the roster.c example provided by libstrophe, but that only prints out the roster once. In a real application, I'll need to request/update this continuously, in order to show any new contacts the user added, etc., in the application.
So basically, I'm unclear on how to make sure that I always display the most current roster and most current statuses of people in my user's contact list.
Am I just supposed to request the roster at some predefined time interval, for example?
roster and presence are 2 different topics.
When you login you normally request the roster which you are doing already. When your contact lists changes during your session you get a roster push with the updated contact. This is an stanza. It doesn't matter if another logged in client manipulated the roster our your client.
The online state called presence of all your subscribed contact comes in with stanzas.
You have to setup handlers with xmpp_handler_add for
Online state, presence stanzas
Roster pushes, iq stanzas with query of namespace jabber:iq:roster

What is an "addedToBoard" notification in Trello API?

Trello API indicates there is a type of notification called "addedToBoard". Does any one knows how to trigger this notification?
I tried adding a member to an existing private and public board but it always triggers an "invitedToBoard" notification.
You can directly add someone to a board (without the invitation process) when the board belongs to an organization he is a member of, and that triggers this action type.