How to Inject User and Sub-Account Properties into Dashboard Iframes
Use {{location.id}}, {{location.name}}, and {{user.firstName}}-style placeholders inside an Embed object's URL on a Sparkforge sub-account dashboard to pass dynamic context into iframes.
Sparkforge sub-account dashboards can pass dynamic user and sub-account properties into embedded iframes. Use placeholder syntax in the embed URL and Sparkforge substitutes real values at render time.
Add an embed with dynamic parameters
- Enter Edit mode on the sub-account dashboard.
- Open the Objects tab.
- Pick Embed.
- Paste the URL of the content you want to embed.
- Add query parameters as needed.
- Use placeholders inside the URL to inject dynamic values.
Sub-account placeholders
Use {{location.id}} or {{location.name}} to inject the sub-account identifier. For example:
https://app.sparkforge.com/v2/location/{{location.id}}/conversationsThat URL becomes a working iframe link that resolves to the current sub-account.
Supported user placeholders
Use {{user.<property>}} with any of the following property names:
companyIdemailphoneroletypefirstNamelastNamenamefullName
Example: https://your-site.com/?user={{user.firstName}} passes the viewer's first name into the embedded URL.
Frequently Asked Questions
Which placeholders can I use in a dashboard iframe URL?
Where do I add the embed object?
Can I use these placeholders in any iframe URL?
What happens if a user property isn't set?
Was this article helpful?
Thanks for the feedback.