Oharra
Baimena behar duzu orria atzitzeko. Direktorioetan saioa has dezakezu edo haiek alda ditzakezu.
Baimena behar duzu orria atzitzeko. Direktorioak alda ditzakezu.
Eskatu metodo hau gertaera pertsonalizatuen azterketa erregistratzeko.
Sintaxia
Microsoft.CIFramework.logAnalyticsEvent(data, eventName, correlationId).then(successCallback, errorCallback);
Parametroak
| Name | Type | Nahitaezko | Deskribapenak |
|---|---|---|---|
| datuak | JSON xedea | Bai | JSON sarrera |
| Ekitaldiaren izena | Soka | Bai | Ekitaldiaren izena |
| KorrelazioaId | GUID | Ez | Diagnostiko telemetriarako erabiltzen dira API deritzen guztiak biltzeko. |
| successCallback | Funtzioa | Ez | Funtzio horri deitzeko, promesa behar bezala itzultzen denean. |
| errorCallback | Funtzioa | Ez | Promesa itzultzeko eskaeran akats bat gertatzen denean deitzeko funtzioa. |
Hauxe da JSON parametroaren data egitura. Ziurtatu soroak sartzen direla: conversationId eta providerSessionId.
{
"conversationId": "<Conversation identifier>",
"providerSessionId": "<Channel Integration Framework Provider Id>",
"clientSessionId":"<Client session identifier>",
"participantId":"<Participant identifier>",
"events": [
{
"kpiEventName": "<Name of the associated KPI event>",
"kpiEventReason": "<Reason due to which the KPI event was created>",
"eventTimestamp": "<Timestamp at which the event occurred>",
"additionalData": "<Additional data related to the session>",
"notificationResponseAction":"<Agent notification response action value>",
"externalCorrelationId": "<External system correlation Id>",
"customData": [
{
"attribute": "<name>",
"value": "<value>"
}
]
}
]
}
Itzulitako balioa
Kate gisa balioa duen promesa
Example
//Success callback handler
const successCallback = (result) => {
// result will indicate if the custom analytics event has been logged
console.log(result);
};
//Failure callback handler
const errorCallback = (error) => {
// handling failure
console.error(error)
};
Microsoft.CIFramework.logAnalyticsEvent(data, eventName, correlationId).then(successCallback, errorCallback);