Skip to main content
Record types are a Salesforce feature that lets the same object behave in different ways. An Account of type Company and one of type Person can have different required fields, different picklist values and different forms. This matters a lot for Treble, because the record type decides which values are valid at the moment a record is created.
This is the origin of most Salesforce errors that seem inexplicable. A value that exists and is correct for one record type is invalid for another, and the Salesforce error message almost never mentions the record type: it talks about the field.

The typical symptom

You’ll see something like this:
The value Postgraduate is not valid for the Program picklist.
And when you check in Salesforce, Postgraduate is in that list. Everything looks correct. What happens is that Postgraduate is available for the Admissions record type, but the record Treble created ended up with another record type, where that value doesn’t exist.
The clue that confirms it: the same flow works when the record already exists in Salesforce (because someone created it with the correct type) and fails when Treble has to create it.

How to choose the record type from Treble

The record type is just another field of the object, called RecordTypeId. It appears in the Salesforce blocks like any other property.
1

Sync the objects

If you just created or modified record types in Salesforce, first run the object sync. Treble only shows the record types it knew about at the last sync.
2

Look for the RecordTypeId property

In the CRM action block, choose the object and look for the RecordTypeId property.
3

Choose the record type from the list

Treble shows the record types of that object by name, not by code. Choose the one that applies.
If you see the names of your record types in the list, the sync is up to date.
Each object has its own record types. Account types don’t work for Lead and vice versa. Treble filters the list by the object you chose in the block, so you shouldn’t be able to make a mistake from the interface.

The order problem: create vs. update

This is the part that takes the most effort, and it’s worth understanding well. Salesforce blocks write after the record exists:
1

Treble looks up the person's record

By the configured phone field.
2

If it doesn't find it, it creates it

With the minimum required fields. At this moment Salesforce assigns it the default record type of the integration user’s profile.
3

Then it writes the block properties

Including RecordTypeId, if you configured it.
If a validation rule or a required field depends on the record type, the record has already been created with the wrong type by the time Treble tries to correct it. The creation fails before reaching step 3.In that case, configuring RecordTypeId in a block isn’t enough. The record type has to be sent at the moment of creation.

What to do when that happens

If the vast majority of the records Treble creates should be of the same type, the simplest approach is for your Salesforce administrator to set that type as the profile’s default type for the user Treble was connected with.That way records are born with the correct type and there’s nothing to correct afterwards.It’s the recommended solution when you have a single use case, and it’s resolved entirely on the Salesforce side.
Treble can send a fixed value for RecordTypeId at the moment of creating any record of that object, regardless of the flow.It’s the solution when you can’t change the user’s profile, or when the Salesforce default value needs to remain something else for the rest of your operation.
This is configured on the integration side, not from the blocks. Write to your Customer Success Manager indicating: the object, and the 18-character Id of the record type (you can find it in Setup → Object Manager → your object → Record Types, in the record type’s URL).
It’s a fixed value per object: every record of that object that Treble creates will have that type, in every flow. If you need different types depending on the campaign, mention it to your Customer Success Manager before configuring it.
A Flow or a Process Builder in Salesforce can assign the record type on creation, based on the record’s origin. It’s the option with the most control, but it lives entirely in your Salesforce org and is maintained by your team.

How to diagnose it

Before asking for help, these three questions usually solve the case:
Open one of the records Treble created in Salesforce and look at its Record Type field. If it’s not the one you expected, you have your diagnosis.

Next steps

Sync objects

The mandatory prior step after touching record types in Salesforce.

Advanced settings

What else can be set at the moment of creation.