Skip to main content

CRM Object

The CRM Object block does the opposite of the CRM Action block: instead of writing to HubSpot, it reads a piece of data from HubSpot and saves it into a Treble variable. From there you can use it anywhere in the conversation. With this you can, for example, greet the customer mentioning the amount of their latest quote, or send them down a different path depending on the stage their deal is in.
In the block menu, this block appears as Assign variables, with the description “Associate objects from contacts”. Once you add it to the conversation, the block is called CRM Object. They are the same block.
The contact properties are already available automatically as hubspot_... variables throughout the conversation. This block is mostly useful for reading properties of deals, companies and tickets, which are not loaded on their own. Check

HubSpot variables in Treble

Add the block to your conversation

  1. Log in to

    app.treble.ai

  2. Go to Create Conversation
  3. Click on the button to display the block menu
  4. Look for the Assign variables block and click on it to add it
  5. Connect it at the point of the flow where you need the data, before the block that is going to use it
  6. Double-click on the block to open its configuration
The block has to go before the block where you use the variable. If you place it after, the variable will be empty when the message is sent.

Configure the block

CRM Object block configuration with object, hierarchy, property and variable name

1. Select an object and its hierarchy

Just like in the CRM Action block, you choose which object you want to read from: contact, deal, company or ticket. If you choose something other than the contact, you have to tell Treble which of the associated objects to use, through the hierarchy: The hierarchy works exactly the same as in the CRM Action block, including the behavior diagram. If you have doubts about which one to choose, check

CRM Action Block

2. Define the property that will be placed in the conversation

Select the property of the object whose value you want to bring into the conversation. For example, Amount for the amount of a deal, Deal stage, or the priority of a ticket.

3. Name the variable

In Variable name you write what the data will be called inside Treble. That is the name you will use between braces later on. For example, if you name it amount, in the following blocks you will be able to write {{amount}}.
Use lowercase names without spaces or accents, like quote_amount or ticket_priority. That way they are easier to remember and to type.

How the block looks in your conversation

Once configured, the block shows a summary of what it does directly on the canvas: the object, the hierarchy, the property it reads and the variable where it saves it. CRM Object block on the canvas showing object, hierarchy, property and the resulting variable The variable appears already written between braces, ready to use. Click on the copy icon to its right and paste it into the block where you need it. That way you avoid typing errors.

What you can do with the variable

Once saved, the variable behaves like any other Treble variable:
  • Show it in a message: “Your quote for {{amount}} is still valid.”
  • Evaluate it in a conditional block: send the customer down one path or another depending on the stage of their deal. Check

    Conditional Block

  • Reuse it in a CRM Action block: read a piece of data from one object and write it into another.
  • Pass it to an AI agent as conversation context.

Use cases

Pick up a quote without asking about it

You read the amount and the stage of the contact’s last created deal, and you open the conversation with that data. The customer feels you are talking about their case, not about a template.

Route support based on ticket priority

You read the priority of the ticket associated with the contact and, with a conditional block, you send high priority cases straight to a human agent and the rest to the AI agent.

Personalize the offer based on the company

You read the size or the industry of the company associated with the contact and use that information to decide which plan to show them.

If something does not work

The variable comes in empty

  1. Does the contact have that object associated? If the contact does not have any deal associated in HubSpot, there is nothing to read.
  2. Did the hierarchy leave everything out? With “Custom”, if no object meets the exact condition, the variable remains empty.
  3. Is the block before the one that uses the variable? This is the most common cause.
  4. Does the property have a value in HubSpot? Open it in HubSpot and confirm it.

I typed the variable name wrong

Use the copy button of the block on the canvas instead of typing it by hand. Copy the name exactly, braces included.

I cannot find the property I want to read

Refresh the properties with the sync button. Check

HubSpot properties in Treble