How to get objet type in Card integration?

I have added a “Card” integraiton into my HS account. It can be shown on the sidebar. My question is how to get the currently displaying card type in the react code?

I know I can get a context object from the request. The context object includes:

```context:

crm: {objectId: 51370421137, objectTypeId: ‘0-2’}

extension: {appId: 30993424, appName: ‘extension-Application’, cardTitle: ‘New Card’}location: “crm.record.sidebar”

…

```

It has objectId which is the record ID. It also includes a objectTypeId. How do I know if the record is a company record or a contact record? Where can I find the mapping for objectTypeId?

Hey there @JZhao

Thank you so much for posting!

I want to share with you some knowledge base articles that would help you solve your issue:

I would also like to tag a few community experts who can share additional ideas. Hey there @RubenBurdin @zach_threadint @GRajput, I hope you’re having a great week! Any thoughts? Thanks!

Victor

Hi @JZhao :waving_hand:

Here’s a table that you can use to map Object Type IDs back to their Object Type Label (search for “Object type IDs” if the anchor link doesn’t work).

I hope that proves helpful. Please let me know if you have any follow-up questions.