En esta página: Encuentre respuestas a preguntas frecuentes acerca de Adobe Target diseños de Recommendations.

¿Cómo puede el precio de un artículo recomendado mostrar ambos dígitos a la derecha del punto decimal?

De manera predeterminada, los valores numéricos (como entity.value) que se devuelven en los diseños no muestran ceros finales después de la coma decimal. Por ejemplo, si un elemento cuesta 35 $, entity.value es igual a 35 y solo se muestra 35 en la página, no 35 $.

Hay dos opciones disponibles para resolver este problema:

  • Secuencias de comandos de Velocity o JavaScript pueden aplicar formato al valor devuelto.

  • El precio del artículo se puede pasar a dos atributos de entidad independientes. La primera, entity.value, se puede utilizar para realizar comparaciones numéricas (como reglas de comparación de precios). El segundo debe ser un atributo personalizado, como entity.displayValue, que almacene el valor de la entidad como una cadena para permitir un procesamiento adecuado.

    Por ejemplo,

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

¿Por qué la categoría no se muestra en el diseño cuando se utiliza $entity1.categoryId?
El ID de categoría no se puede mostrar en un diseño. Se pueden almacenar varias categorías, por lo que el sistema no sabe qué categoría mostrar.
¿Cómo se puede cambiar un diseño para obtener una actualización instantánea?
La alteración del diseño que se está usando actualmente tarda unos minutos en actualizarse. Para cambiar el diseño de forma instantánea, cree un nuevo diseño, selecciónelo en la actividad y guarde la recomendación.
¿Cómo se puede mostrar la información clave, como la categoría del producto clave, en un diseño?
Los parámetros $key capturan la mayor parte de la información del producto clave para mostrarla dentro del diseño. Por ejemplo, para mostrar la miniatura del producto clave, use $key.thumbnailURL.
¿Qué versión de Velocity se utiliza?
Versión 1.7, sin herramientas ni bibliotecas adicionales añadidas. La funcionalidad básica de Velocity se encuentra disponible.
¿Cómo se puede reemplazar un valor de entidad existente por un en blanco, por ejemplo, cuando el entity.message de un elemento debe borrarse al final de una promoción?
Parece ser que se consigue enviando un espacio de no separación de JavaScript. Los desarrolladores envían \u00A0 como valor, por ejemplo entity.message=\u00A0. También se puede considerar el uso de ese valor como predeterminado cuando no hay ningún valor presente, en lugar de un cero.
¿Se puede usar un script de perfil en un diseño de Recommendations?
Sí. Para utilizar un script de perfil en un diseño de Recommendations, ajuste el nombre en \${...}. Por ejemplo, si el script de perfil se llama user.basket, en el diseño haga referencia a él como \${user.basket}. La barra invertida implica que Velocity no procesa el script de perfil, por lo que no se pueden realizar operaciones en el script de perfil de una plantilla de Velocity. El valor se imprime directamente en la página.
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.
Traducido automáticamente
Utilice el selector de idioma para ver la versión en inglés de esta página.
¿Ha sido útil la traducción?

Preguntar IA

¿No sabe por dónde empezar?
Pregúnteme lo que quiera sobre los productos de Adobe.

Escriba su pregunta o elija una sugerencia a continuación.

El uso de este chatbot de IA está sujeto a la Política de privacidadde Adobe. No comparta datos confidenciales. Las respuestas de la IA no son su Contenido, pueden ser inexactas y cualquier oferta proporcionada no es vinculante.Términos de IA generativa.

Preguntar IA