https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
a

acceptable-insurance-37652

05/25/2022, 3:46 AM
I guess part of and second question is that when setting attributes does that re-query the api for features that match. For instance if I write feature sets based on company and a user switches account (presuming they have multiple) then calling
setAttributes
would I then need to manually re call the api or is that part of the async action from setAttributes
f

fresh-football-47124

05/25/2022, 3:51 AM
yes, setAttributes overwrites existing attributes and does rerun which features are shown, and may change the assigned feature values.
a

acceptable-insurance-37652

05/25/2022, 3:57 AM
So if I'm reading the docs right all features are sent and the rule engine is in context. So there isn't a 'server' side resolver where you would say give me features for company x. It looks like the resolved json would have to hold all the details for all the outcomes. Not that there would be that many to be honest. But I might have concern of using a company id for instance for eval.
f

fresh-football-47124

05/25/2022, 3:58 AM
that's right
a

acceptable-insurance-37652

05/25/2022, 3:58 AM
Ok
f

fresh-football-47124

05/25/2022, 3:58 AM
but you can abstract them as much as you like
like you could hash the id
and it would work the same
a

acceptable-insurance-37652

05/25/2022, 3:58 AM
So it might behove you to map the id's somewhere else.
Ok
That makes sense
15 Views