# Custom attribute set with custom. but my CQL condition never matches

Asked by rob on 2026-11-18. Tags: vue, cql, profiles.

I write a custom profile attribute from my Vue app like this:

```js
croct.user.edit().set('custom.expertise', 'vue').save();
```

Then I reference it in a CQL condition for an audience, and the audience never
matches. The write looks like it succeeds, no error. I am fairly sure I am
referencing the attribute name wrong in the query but I cannot see how

## 2 answers

### Answer from diego_m (2026-11-19)

It is the prefix. Custom attributes are written with the `custom.` prefix, so
your `set('custom.expertise', 'vue')` is correct. But in CQL you query the same
attribute without the prefix. So the condition should reference `expertise`,
not `custom.expertise`:

```cql
user's expertise is "vue"
```

Write with `custom.`, read without it. That asymmetry catches a lot of people.

### Answer from yasmin_k (2026-11-20)

And the reason it fails silently rather than erroring: undefined variables
evaluate to false by design. So when you query `custom.expertise` in CQL there
is no such variable, it resolves to false, and the audience just never matches.
No error, no match, exactly what you saw.

Unrelated but worth knowing while you are in there: set attributes like
interests merge rather than overwrite when you save, and if the same attribute
gets conflicting values the most recent one wins. So repeated saves build up
rather than clobber.

#### Reply from rob (2026-11-21)

Dropped the prefix in the query and it matches now. The silent false
explains why I got no error to chase. Cheers
