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


#1

Hello,

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

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

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.


#3

Thank you @Derek_Gervais, all working fine now.