how can I customise a card content?

JZhao
Member

I read through this doc https://legacydocs.hubspot.com/docs/methods/crm-extensions/crm-extensions-overview#data-fetch-reques... but it doesn't seem to work with the card I created.

 

I have created a card and installed it in one of my account. I am able to view the card in the right panel when I open a company. But the content is empty. 

 

I have created a property with a display label in the card but it still shows empty. 

 

I also set a data fetch URL in the card setting and I am able to see a request comes to my backend service. I believe this is from hubspot when I open the card. My service response below json to the request. But still I can't see anything in the page. It is always empty.

 

{
objectId: event.associatedObjectId,
title: 'API-54: Question about bulk APIs',
link: 'https://dashboard.myzeller.dev',
created: '2016-08-04',
priority: 'HIGH',
project: 'API',
reported_by: 'ksmith@hubspot.com',
description:
'Customer is not able to find documentation about our bulk Contacts APIs.',
reporter_type: 'Support Rep',
status: 'Resolved',
ticket_type: 'Bug',
updated: '2016-09-23',
properties: [
{
label: 'Resolved by',
dataType: 'EMAIL',
value: 'ijones@hubspot.com',
},
{
label: 'Resolution type',
dataType: 'STRING',
value: 'Referred to documentation',
},
{
label: 'Resolution impact',
dataType: 'CURRENCY',
value: '94.34',
currencyCode: 'GBP',
},
],
actions: [
{
type: 'IFRAME',
width: 890,
height: 748,
uri: '',
label: 'Edit',
},
{
type: 'CONFIRMATION_ACTION_HOOK',
confirmationMessage: 'Are you sure you want to delete this ticket?',
confirmButtonText: 'Yes',
cancelButtonText: 'No',
httpMethod: 'DELETE',
associatedObjectProperties: ['protected_account'],
uri: 'https://dashboard.myzeller.dev/',
label: 'Delete',
},
],
};

0 Upvotes
7 Replies 7
dennisedson
Community Manager

@himanshurauthan , would you be able to help here?

Thanks,

Dennis


We are excited to announce that the Community will be launching a weekly newsletter on November 2, 2020!
Sign up today!
0 Upvotes
JZhao
Member

Also if there is anything wrong with my service's response payload, is there any logs in hubspot I can view to see the errors?

0 Upvotes
JZhao
Member

Hi @dennisedson , can I get an update on this issue I am facing? Thanks.

0 Upvotes
JZhao
Member

I appreciate anyone can give some advice on this? Thanks.

0 Upvotes
RMones
Participant

Hi @JZhao ,

 

You ar missing some required data.

The objects must best nested in the "result" object and think about the double quotes in your json payload..

{
  "results": [
    {
      "objectId": 1,
      "title": "TITLE 1",
      "link": "https://dashboard.myzeller.dev"
    },
    {
      "objectId": 3,
      "title": "TITLE 2",
      "link": "https://dashboard.myzeller.dev"
    }
  ]
}

 

Greets Ronald

JZhao
Member

I have tried to put them inside results and I am able to see my API is called but I got this error on hubspot card content. How do I know what error this is about?

 

There was a problem reaching Demo Company Card. Please refresh the page to try again or contact the app developer for support.

0 Upvotes
JZhao
Member

I also see you put objectId as 1, 2. What does objectId mean? Can I put any number I like? I'd like to show different content for different company. So I need to response to what the users open in the dashboard. Which id should I use?

0 Upvotes