Sitefinity Insight
Learn how to personalize the conversation with Sitefinity Insight.
Important: In order to enable this integration, you need to publish your bot on a Sitefinity website.
For more information, check this article.
Insight object in the conversation context
When you publish your chatbot on a Sitefinity website with a configured Sitefinity Insight connector, you will notice additional data in the context of the conversations coming from that website. The additional data has the following format:
{
...
"_systemTracking": {
"insight": {
"apiKey": "yourInsightApiKey",
"datasource": "yourInsightDataSource",
"subject": "theSubjectIdentifier",
"canTrackCurrentUser": "subjectConsent"
}
}
...
}
- apiKey The API key of the data center as configured in Sitefinity.
- datasource The name of the data source where the subject is reported as configured in Sitefinity.
- subject The subject ID of the visitor as identified in Sitefinity.
- canTrackCurrentUser Visitor consent preference. For more information, refer to Tracking consent article.
Note: The insight object will be available in the context only for conversations completed on the Sitefinity website. While testing the chatbot in the NativeChat portal, you can use conditions to supply default settings if the insight object is not present.
Log an interaction in Sitefinity Insight
You can use Sitefinity Insight REST API to log an interaction using a webhook step:
{
"steps": [
...
{
"type": "webhook",
"entity": "interactionResponse",
"data-source": {
"endpoint": "https://api.insight.sitefinity.com/collect/v2/data-centers/{{_systemTracking.insight.apiKey}}/datasources/{{_systemTracking.insight.datasource}}/interactions",
"method": "POST",
"payload": {
"S": "{{_systemTracking.insight.subject}}",
"P": "Chatbot Interaction",
"O": "chatbotConversationCompleted"
}
}
...
]
}
Personalize the conversation
You can use Sitefinity Insight REST API to get information about the lead scoring types the visitor is associated with using a webhook step:
{
"steps": [
...
{
"type": "webhook",
"entity": "userScoring",
"data-source": {
"endpoint": "https://api.insight.sitefinity.com/analytics/v2/scorings/leads/in",
"method": "GET",
"headers": {
"Authorization": "authorizationHeader",
"x-dataintelligence-datacenterkey": "{{_systemTracking.insight.apiKey}}",
"x-dataintelligence-datasource": "{{_systemTracking.insight.datasource}}",
"x-dataintelligence-subject": "{{_systemTracking.insight.subject}}"
}
}
}
...
]
}
For information how to authorize a secured Insight endpoint, refer to this article.
Somethings missing or not clear?
Ask a question in our community forums or submit a support ticket.