Version: 1.0
For: New Partner Companies
Time Required: 15-30 minutes
yourcompany)window.authUser with email and nameconsole.log(window.authUser)Quick Code:
<script>
window.authUser = {
email: '{{ user.email }}',
name: '{{ user.name }}'
};
</script>
contactSupport() function from guideyourcompany with your tenant slugconsole.log(typeof contactSupport)Quick Code:
function contactSupport(e, openInNewTab = true) {
if (e) e.preventDefault();
const user = window.authUser;
if (!user?.email) {
alert('Please sign in first.');
return;
}
const form = document.createElement('form');
form.method = 'POST';
form.action = 'https://tickets.flare99.com/api/auth/redirect/YOURSLUG';
form.target = openInNewTab ? '_blank' : '_self';
['email', 'name'].forEach(field => {
const input = document.createElement('input');
input.type = 'hidden';
input.name = field;
input.value = user[field] || '';
form.appendChild(input);
});
document.body.appendChild(form);
form.submit();
form.remove();
}
onclick="contactSupport(event)"Quick Code:
<a href="#" onclick="contactSupport(event)">Submit Ticket</a>
// Test 1: User data exists
console.log('User:', window.authUser);
// Expected: {email: "user@example.com", name: "John Doe"}
// Test 2: Function exists
console.log('Function:', typeof contactSupport);
// Expected: "function"
// Test 3: Manual trigger (same tab)
contactSupport(null, false);
// Expected: Form submits and redirects
tickets.flare99.com| Issue | Quick Fix |
|---|---|
window.authUser is undefined |
Check if user authentication code is in template |
| Button does nothing | Check browser console for JavaScript errors |
| CORS error | Use Form POST method OR contact us for whitelist |
| User not auto-logged in | Verify email matches exactly, check cookies enabled |
| Token expired | Tokens valid 2 minutes, ensure page is fresh |
| Method | Difficulty | User Experience | CORS Required |
|---|---|---|---|
| Form POST | ⭐ Easy | Page reload/new tab | ❌ No |
| AJAX/Fetch | ⭐⭐ Medium | Seamless (no reload) | ✅ Yes |
| postMessage | ⭐⭐⭐ Advanced | Complex scenarios | ✅ Yes |
Recommendation: Start with Form POST (easiest, no CORS needed)
Integration Issues: integration@flare99.com
Technical Support: support@flare99.com
Emergency: +1-XXX-XXX-XXXX
Your integration is complete when:
✅ Logged-out users see login prompt
✅ Logged-in users redirect to ticket system
✅ Users auto-authenticated without re-login
✅ Users can create tickets successfully
✅ Session persists across page reloads
EXTERNAL_COMPANY_INTEGRATION_GUIDE.mdNeed help? Contact integration@flare99.com with:
Estimated completion time: 15-30 minutes for basic integration 🚀