i am stuck at creating note engagement for my integration with voip telepohny system(krispcall).
According to the developer docs provided by hubspot they have listed SimplePublicObjectInputForCreate object to do the job but i don't think this one is avalilable. After doing some research in community, i found some developers suggesting simplepublicobjectinput object instead but still could not hit on target. SimplePublicObjectInput is not allowed to have association object with it. So what is the permanent solution for it .
The SimplePublicObjectInputForCreate object is no longer available in the HubSpot API. The SimplePublicObjectInput object can be used to create notes, but it does not allow you to associate the note with another object. The permanent solution for this is to use the EngagementInput object. The EngagementInput object allows you to create a note and associate it with another object, such as a contact or a deal.
How to create a note engagement using the EngagementInput object:
const engagementInput = {
engagement: {
active: true,
type: "NOTE",
timestamp: 1664375177444,
},
associations: {
contactIds: [contactId],
},
metadata: {
body: "This is a note about the contact.",
},
};
const response = await hubspot.engagements.create(engagementInput);
You can create a note with the specified body and associate it with the contact with the specified ID.
The SimplePublicObjectInputForCreate object is no longer available in the HubSpot API. The SimplePublicObjectInput object can be used to create notes, but it does not allow you to associate the note with another object. The permanent solution for this is to use the EngagementInput object. The EngagementInput object allows you to create a note and associate it with another object, such as a contact or a deal.
How to create a note engagement using the EngagementInput object:
const engagementInput = {
engagement: {
active: true,
type: "NOTE",
timestamp: 1664375177444,
},
associations: {
contactIds: [contactId],
},
metadata: {
body: "This is a note about the contact.",
},
};
const response = await hubspot.engagements.create(engagementInput);
You can create a note with the specified body and associate it with the contact with the specified ID.