# Storing skin-quiz answers on the profile to personalize a beauty store

Asked by renata_v on 2026-07-14. Tags: shopify, hydrogen, profiles, custom-attributes.

We run a skin-type quiz on our Hydrogen store and want the answers to drive
routine recommendations across the storefront. This is the payload I want on
the profile when the quiz completes:

```json
{
    "skinType": "combination",
    "concerns": ["redness", "dryness"],
    "spfDaily": true
}
```

Two questions. How do I write this to the Croct profile from the quiz completion
handler, and is there a naming convention I should follow so these attributes
are usable in audience conditions later

## 1 answer

### Accepted answer from Miriam Adler (2026-07-14)

Custom attributes are written through the user patch API. From your quiz
completion handler:

```js
croct.user.edit()
    .set('custom.skinType', 'combination')
    .set('custom.concerns', ['redness', 'dryness'])
    .set('custom.spfDaily', true)
    .save();
```

The one quirk to know: attributes are written with the `custom.` prefix but
queried without it in CQL. So the audience condition is:

```cql
user's skinType is "combination"
```

not `user's custom.skinType`. That trips almost everyone once.

On naming, camelCase like you have it is the usual convention and keeps the
CQL readable.

Also worth knowing for your use case: audiences evaluate in real time, so the
personalization reacts in the same session the quiz is completed. The shopper
finishes the quiz, and the routine recommendation slot can already serve the
combination-skin variant on the very next page.

#### Reply from renata_v (2026-07-15)

Confirmed working, and the same-session part is exactly what we wanted.
The prefix quirk would have cost me an afternoon, thanks for flagging it.
