[Premium]{class="badge positive" title="Scopri cosa è incluso in Target Premium."}

Domande frequenti sulle progettazioni design-faq

In questa pagina: Trova le risposte alle domande più frequenti sulle progettazioni di Adobe Target Recommendations.

In che modo il prezzo di un articolo consigliato può visualizzare entrambe le cifre a destra del punto decimale?

Per impostazione predefinita, i valori numerici (ad esempio entity.value) restituiti nelle progettazioni non presentano eventuali zeri finali dopo il punto decimale. Ad esempio, se un articolo costa $35,00, entity.value è pari a 35 e sulla pagina viene visualizzato solo $35, e non $35,00.

Per risolvere il problema sono disponibili due opzioni:

  • Velocity scripting o JavaScript può applicare la formattazione al valore restituito.

  • Il prezzo dell’articolo può essere trasmesso in due attributi di entità separati. Il primo, entity.value, può essere utilizzato per confronti numerici (ad esempio per regole di confronto dei prezzi). Il secondo deve essere un attributo personalizzato, ad esempio entity.displayValue, che memorizza il valore dell’entità come stringa per consentirne il rendering corretto.

    Ad esempio,

    "entity.value" : 35.00, "entity.displayValue" : "$35.00"

Perché la categoria non viene visualizzata nella progettazione quando si utilizza $entity1.categoryId?
Impossibile visualizzare l’ID categoria in una progettazione. È possibile memorizzare più categorie, pertanto il sistema non sa quale categoria visualizzare.
Come si può modificare una progettazione per ottenere un aggiornamento immediato?
L’aggiornamento delle modifiche alla progettazione in uso richiede un po’ di tempo. Per modificare immediatamente la progettazione, creane una nuova, selezionala nell’attività e salva il consiglio.
In che modo le informazioni chiave, ad esempio la categoria del prodotto chiave, possono essere visualizzate in una progettazione?
I parametri $key acquisiscono la maggior parte delle informazioni del prodotto chiave da visualizzare nella progettazione. Ad esempio, per visualizzare la miniatura del prodotto chiave, utilizzare $key.thumbnailURL.
Quale versione di Velocity viene utilizzata?
Versione 1.7, senza l’aggiunta di strumenti o librerie. È disponibile la funzionalità di Velocity base.
In che modo un valore di entità esistente può essere sostituito con uno vuoto, ad esempio quando il valore entity.message di un elemento deve essere cancellato al termine di una promozione?
A tale scopo, viene visualizzato l’invio di uno spazio unificatore JavaScript. Gli sviluppatori inviano \u00A0 come valore, ad esempio entity.message=\u00A0. È inoltre possibile utilizzare tale valore come valore predefinito quando non è presente alcun valore, anziché null.
È possibile utilizzare uno script di profilo in una progettazione Recommendations?
Sì. Per utilizzare uno script di profilo in una progettazione Recommendations, racchiudi il nome in \${...}. Ad esempio, se lo script di profilo è denominato user.basket, nella progettazione fare riferimento a esso come \${user.basket}. La barra rovesciata implica che lo script di profilo non viene renderizzato da Velocity, pertanto non è possibile eseguire operazioni sullo script di profilo in un modello Velocity. Il valore viene stampato direttamente sulla pagina.
AI Knowledge Reference

This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.

For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.

  • TL;DR: Gives answers to frequently asked questions about Adobe Target Recommendations designs.

Intents:

  • Display both digits to the right of the decimal point for the price of a recommended item.
  • Change a design to get an instant update.
  • Display key information, such as the category of the key product, in a design.
  • Replace an existing entity value with a blank.
  • Use a profile script in a Recommendations design.

Glossary:

  • entity.value: a numeric value returned in designs. (product-specific)
  • entity.displayValue: a custom attribute, given as an example, that stores the value of the entity as a string to allow for proper rendering. (product-specific)
  • $key parameters: parameters that capture most of the information of the key product for display within the design. (product-specific)

Guardrails:

  • Velocity version 1.7 is used, with no additional tools or libraries added. Basic Velocity functionality is available.
  • When a profile script is wrapped in \${...}, the backslash implies that it is not rendered by Velocity, so no operations can be performed on it in a Velocity template. The value is printed directly on the page.

Terminology:

  • Canonical name: Adobe Target Recommendations
  • Variants: Recommendations

FAQ:

  • How can the price of a recommended item display both digits to the right of the decimal point? By default, numeric values (such as entity.value) returned in designs do not display any trailing zeroes after the decimal point, so an item that costs $35.00 displays only 35. Two options are available: Velocity scripting or JavaScript can apply formatting to the returned value, or the price of the item can be passed into two separate entity attributes, entity.value for numeric comparisons (such as price comparison rules) and a custom attribute, such as entity.displayValue, that stores the value of the entity as a string.
  • Why is the category not displayed in the design when $entity1.categoryId is used? The category ID cannot be displayed in a design.
  • How can a design be changed to get an instant update? Create a new design, select it in the activity, and save the recommendation.
  • How can key information, such as the category of the key product, be displayed in a design? Use the $key parameters, which capture most of the information of the key product for display within the design. For example, use $key.thumbnailURL to display the thumbnail of the key product.
  • How can an existing entity value be replaced with a blank, for example when the entity.message of an item must be cleared at the end of a promotion? Sending a JavaScript non-breaking space appears to do this. The developers send \u00A0 as the value, for example entity.message=\u00A0. Using that value as the default when no value is present, instead of a null, can also be considered.
  • Can a profile script be used in a Recommendations design? Yes. Wrap the name of the profile script in \${...}. For example, if the profile script is named user.basket, refer to it as \${user.basket} in the design.

Troubleshooting:

  • The category is not displayed in the design when $entity1.categoryId is used. Multiple categories can be stored, so the system does not know which category to display.
  • Altering the design that is currently in use takes a while to update. To change the design instantly, create a new design, select it in the activity, and save the recommendation.

Examples:

  • Passing the price of an item into two separate entity attributes so that entity.value can be used for numeric comparisons and the custom attribute can be used for proper rendering: "entity.value" : 35.00, "entity.displayValue" : "$35.00"
  • Displaying the thumbnail of the key product in a design: $key.thumbnailURL
  • Sending a JavaScript non-breaking space, which appears to replace an existing entity value with a blank, for example when the entity.message of an item must be cleared at the end of a promotion: entity.message=\u00A0
  • Referring to a profile script named user.basket in a design: \${user.basket}

Personas:

  • developer: Can apply formatting to a returned value with Velocity scripting or JavaScript, or pass the price of an item into entity.value and a custom attribute such as entity.displayValue. Can use $key.thumbnailURL to display the thumbnail of the key product, and refer to a profile script named user.basket as \${user.basket} in a design. Where: “FAQ”.
  • marketer: Can create a new design, select it in the activity, and save the recommendation to change a design instantly. The page states that altering the design currently in use takes a while to update. Where: “FAQ”.

Onboarding:

  • Level: Intermediate, Experienced
  • First minimal step: Create a new design, select it in the activity, and save the recommendation to change a design instantly.
recommendation-more-help
target-help-main