Hello. I am working on a Invite User flow and am h...
# ask-a-descoper
b
Hello. I am working on a Invite User flow and am having trouble passing the person who invited the user (Inviter) through to the new user into the cutom attribute i created "Invited By" Are there any descopers available to assist with my flow?
I have this scriptlet added to pass to the User / Invite action via dynamic keys
And I added the invitedBy attribute to the User via custom attribute
also just trying to run the flow in descope flow editor has issues becuse I am do not have an autheticate step in the flow, but for my users they are already auth'd in the app so I don't have a login there
Are those dynamic template keys only things for the email? now that I am looking again it looks like they may be for the email template. but the AI assist suggested I put them there to populate the user with invitedBy...
n
Hey @Ben Strawbridge Thanks for reaching out. I am currently looking into the best solution for this, so please bear with me. I will provide an update as soon as possible. To clarify, Template Dynamic Keys are only applicable to email templates. They are used solely to render values inside the invitation email and will never set or persist user attributes (including custom attributes like
invitedBy
) on the invited user. Dynamic keys resolve values from the flow context at runtime, but unless a specific action explicitly writes those values to a user record, they remain ephemeral. More details on how dynamic keys work can be found here: https://docs.descope.com/flows/dynamic-keys
b
OK thank you. Makes sense, when i looked at the screenshot i shared i realized they were under the email section. Essentially what I am looking for is a way to add the email or login id or the person who fills the invite form on our app to the new user invited as
invitedBy
key... I will check back on this thread later see if you have an update. thanks @Nick Rodriguez!
n
After doing some research, here's what I would recommend: In the User / Invite action, use “Add invite attribute value” to set user attributes for the invited user. This is the only part of the action that writes attributes to the user profile. For example, you can set a custom attribute like
invitedBy
to the email or login ID of the authenticated user submitting the invite form. More details on invite attributes and how the Invite action works can be found here: • https://docs.descope.com/management/user-management#user-invite-flow • https://docs.descope.com/management/user-management/invite-users If it helps, I’m happy to create a mockup example of how this flow would work. To keep it as accurate as possible to your production setup, you can export and share your flow, and I’ll tailor the example to match it.