adobe.target.sendNotifications(options)
Questa funzione invia una notifica al server Edge Target quando viene eseguito il rendering di un'esperienza senza utilizzare adobe.target.applyOffer() o adobe.target.applyOffers().
Richiesta
I seguenti nomi non sono consentiti per i parametri:
- orderId
 - orderTotal
 - productPurchasedIds
 
Considera i seguenti aspetti:
- Limite massimo di parametri: 50.
 - Il nome del parametro non può restare vuoto.
 - Lunghezza massima del nome del parametro: 128.
 - Il nome del parametro non può iniziare con “profile”.
 - Lunghezza massima del valore parametro: 5000.
 
I seguenti nomi non sono consentiti per i parametri:
- orderId
 - orderTotal
 - productPurchasedIds
 
Considera i seguenti aspetti:
- Limite massimo di parametri: 50.
 - Il nome del parametro non può restare vuoto.
 - Lunghezza massima del nome del parametro: 128.
 - Il nome del parametro non può iniziare con “profile”.
 - Lunghezza massima del valore parametro: 5000.
 
Request > notifications > order
id
<= 250 caratteri.Request > notifications > order
total
>= 0Request > notifications > order
purchasedProductIds
- Non sono consentiti valori vuoti.
 - Lunghezza massima di ogni ID prodotto: 50.
 - Lunghezza massima degli ID dei prodotti, separati da virgole e concatenati: 250.
 
<= 128 caratteri; non può essere vuoto.<= 128 caratteri; non può essere vuoto.<= 200 caratteri.<= 128 caratteri.<int64>Request > notifications > mbox
name
Non sono consentiti valori vuoti.
Caratteri consentiti: vedi la nota in calce alla tabella.
Request > notifications > mbox
state
Request > notifications > view
id
<int64>Request > notifications > view
name
<= 128 caratteri.Request > notifications > view
key
<= 512 caratteri.Request > notifications > view
state
Nota: i seguenti caratteri sono non consentiti per Request > notifications > mbox > name:
- '-, ./=`:;&!@#$%^&*()+|?~[]{}'
            Chiamata sendNotifications() dopo il rendering delle mbox preacquisite
function createTokens(options) {
  return options.map(e => e.eventToken);
}
function createNotification(mbox, type, tokens) {
  const id = 11111; // here we should use a random ID like UUID
  const timestamp = Date.now();
  const { name, state, parameters, profileParameters, order, product } = mbox;
  const result = {
    id,
    type,
    timestamp,
    parameters,
    profileParameters,
    order,
    product
  };
  result.mbox = { name, state };
  result.tokens = tokens;
  return result;
}
adobe.target.getOffers({
  request: {
    prefetch: {
      mboxes: [
        {
          index: 0,
          name: "a1-serverside-ab"
        }
      ]
    }
  }
})
.then(response => {
  const mboxes = response.prefetch.mboxes;
  const notifications = mboxes.map(mbox => {
    const type = "display";
    const tokens = createTokens(mbox.options);
    return createNotification(mbox, type, tokens);
  });
  adobe.target.sendNotifications({
    request: { notifications }
  });
})
            getOffers() solo con preacquisizione e sendNotifications(), la richiesta di Analytics deve essere attivata dopo l'esecuzione di sendNotifications(). Lo scopo di questo controllo è garantire che l'identificatore SDID generato da sendNotifications() corrisponda all'identificatore SDID inviato a Analytics e Target.