Setup Guide
1
Get your API key
Sign up for Factr at https://factr.polsia.app and copy your API key from Settings.
2
Create a Webhook in Intercom
Go to Settings → Webhooks and add a new webhook URL pointing to your server.
3
Enrich on incoming messages
Use Intercom's automation to trigger Factr API calls when new messages arrive.
4
Add facts to message context
Store enriched facts in custom attributes and reference them in your message templates.
Code Example
JavaScript / Node.js
// Intercom webhook handler
app.post('/webhooks/intercom', (req, res) => {
const { data } = req.body;
const email = data.item.user.email;
// Call Factr enrichment API
fetch('https://factr.polsia.app/api/enrich', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, apiKey: process.env.FACTR_API_KEY })
})
.then(r => r.json())
.then(enrichment => {
// Update Intercom custom attributes
console.log('Enriched fact:', enrichment.fact);
// Use Intercom API to set custom_attributes
});
res.json({ success: true });
});
Key Benefits
- Personalize every customer interaction
- Auto-enrich contact profiles in real-time
- Reference personal facts in templates
- Track re-engagement conversion rates