APIs & Integrations

JZhao
Participante

how can I customise a card content?

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 Avaliação positiva
9 Respostas 9
RMones
Colaborador(a) | Parceiro Platinum
Colaborador(a) | Parceiro Platinum

how can I customise a card content?

Have tried it with a static payload? So i mean copied my payload and tried this with the card?
And yes in the objectId you can put any number you like.

 

Maybe you can share the URL of your endpoint, and then I'll take a look for you!

JZhao
Participante

how can I customise a card content?

Hi @RMones , yes, your payload works fine. Is there a full reference document about what payload syntax I should use? I only see this doc https://legacydocs.hubspot.com/docs/methods/crm-extensions/crm-extensions-overview#data-fetch-reques... which is just a tutorial not a reference doc.

 

How can I authroise my backend endpoint which only allow hubspot calls? I don't want it is called from any other people from public internet.

0 Avaliação positiva
RMones
Colaborador(a) | Parceiro Platinum
Colaborador(a) | Parceiro Platinum

how can I customise a card content?

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
Participante

how can I customise a card content?

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 Avaliação positiva
JZhao
Participante

how can I customise a card content?

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 Avaliação positiva
JZhao
Participante

how can I customise a card content?

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

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

how can I customise a card content?

@himanshurauthan , would you be able to help here?

0 Avaliação positiva
JZhao
Participante

how can I customise a card content?

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

0 Avaliação positiva
JZhao
Participante

how can I customise a card content?

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 Avaliação positiva