APIs & Integrations

Edouard_DUBOIS
Member

CRM Extension : Fetch Request Response format : Multiple cards in one Object

Hello,

I’m trying to integrate multiple ‘cards’ in the response object to the data fetch request :

CRM Extensions overview

Overview for using the CRM Extensions API

I’m correctly sending a response for a single ‘card’ and displaying it in HubSpot :

{
  results: [{
    objectId: (id),
    title: 'My title',
    ...
  }],
  primaryAction: {
    type: 'ACTION_HOOK',
    httpMethod: 'PUT',
    uri: (uri for action),
    label: 'The label',
    associatedObjectProperties: [
      'firstname',
      'lastname',
      ...
    ],
  },
}

This works very well, but I would like to pass a second object in the results array.
In the api documentation above there is an example of a second ticket in the result array but it has a different objectId.

I’m not entirely sure I should create a new CRM Extension Object to display my second card since it would have it’s own distinct : name, fetch_url and properties. Meaning that it would fetch something else, while my second ‘card’ is in the response to the fetch of the original object.

Should I really create a second object for the second card, if so, will it fetch data twice ?
Am I interpreting the format of the answer wrong ?

Thank you for your help,

Édouard

2 Replies 2
Edouard_DUBOIS
Member

CRM Extension : Fetch Request Response format : Multiple cards in one Object

Thank you @Derek_Gervais, all working fine now.

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

CRM Extension : Fetch Request Response format : Multiple cards in one Object

Hi @Edouard_DUBOIS,

The objectId isn’t the object’s CRM Object Type. It’s a unique identifier for the particular object. Each separate ‘card’ should have a unique objectId. For example; if you’re creating an extension for bug reports, all bug reports will share the same object type, but each unique bug report should have a unique objectId.

0 Upvotes