Loading
Salesforce Document Generation
Índice de materias
Seleccionar filtros

          No hay resultados
          No hay resultados
          Estas son algunas sugerencias de búsqueda

          Compruebe la ortografía de sus palabras clave.
          Utilice términos de búsqueda más generales.
          Seleccione menos filtros para ampliar su búsqueda.

          Buscar en toda la Ayuda de Salesforce
          Create a Multilevel Hierarchy Transformation for Document Generation

          Create a Multilevel Hierarchy Transformation for Document Generation

          Create a nested hierarchy across groups, bundles, and products.

          Required Editions

          Available in: Lightning Experience
          Available in: Professional, Enterprise, Unlimited, and Developer Editions
          User Permissions Needed
          To configure multilevel hierarchy transformation for Document Generation: DocGen Designer with Admin Persona

          Use Case: A quote contains parent groups and child groups, bundles within groups, nested bundle items, and standalone products. Use multilevel hierarchy transformation to represent relationships such as Quote → Quote Line Group → Quote Line Item and show nested structures in the document output.

          Before you begin:

          1. Create a quote with groups, bundles, and nested items.
            Quote line items showing groups, bundles, and nested products.
          2. Open the context definition.
          3. Add nodes.
            Each node represents a dataset that DPE processes independently. These nodes become Data Source Subtype nodes during transformation.
            1. Quote
            2. Quote Line Group
            3. Quote Line Item
          4. Add relationship fields.
            Hierarchy is built by using these identifiers. Parent Quote Line Group ID and Parent Quote Line Item ID turn on multilevel and self-referencing relationships such as group → subgroup → bundle.
            1. Quote ID
            2. Quote Line Group ID
            3. Parent Quote Line Group ID
            4. Quote Line Item ID
            5. Parent Quote Line Item ID
          5. Configure field mappings.
            DPE doesn’t infer relationships automatically. These mappings explicitly define how nodes connect, enabling correct parent-child linking across multiple levels.
            1. In quote, map Quote ID to ID
              Field mapping for Quote showing Quote ID mapped to ID.
            2. In quote Line Group, map these references.
              • Parent Reference in Quote Line Group to Quote ID
              • Map Quote Line Group ID to ID
              • Map Parent Quote Line Group ID to Parent Quote Line Group ID
                Field mapping for Quote Line Group showing Parent Reference mapped to Quote ID and Quote Line Group ID mapped to ID.
            3. In quote line item, map these references.
              • Parent Reference in Quote Line Item to Quote Line Group ID
              • Map Parent Quote Line Item ID to Parent Quote Line Item ID
                Field mapping for Quote Line Item showing Parent Reference and Parent Quote Line Item ID mapped for hierarchy relationships.
          6. From the Transform tab, select the transform you created.
            When you open the DPE definition from the Transform tab, the Data Source node is preconfigured with the context data structure. It uses context as the source type, the selected context definition as the source object. It retrieves context data at run time based on the provided identifier, such as a Quote ID.
            The Data Source node and Data Source Subtype nodes are preconfigured and mapped to the context definition to retrieve context data at run time by using the Context Instance Identifier, such as the Quote ID.
          7. Configure JSON writebacks:
            Each level must independently define its hierarchy.
            1. Quote Writeback
              Quote is the root object and doesn’t require hierarchy. It acts as the container for all child records.
              • For Source Node, select Quote.
              • For Target Type, select JSON.
              • For JSON Structure, select Simple.
            2. Quote Line Group Writeback
              Quote Line Group contains self-referencing relationships (group → child group). Hierarchy structure enables nesting across multiple group levels.
              • For Source Node, select Quote.
              • For Target Type, select JSON
              • For JSON Structure, select Hierarchy
              • Enter a JSON name.
              • To configure the hierarchy configuration, set Parent Identifier to Parent Quote Line Group ID, and Record Identifier to Quote Line Group ID. Parent Identifier defines the parent-child relationship, and Record Identifier uniquely identifies each node. Together, they allow DPE to construct the hierarchy tree.
            3. Quote Line Item Writeback
              Quote Line Item supports nested bundles. This configuration preserves the bundle → sub-bundle → product hierarchy.
              • For Target Type, select JSON.
              • For JSON Structure, select Hierarchy.
              • Enter a JSON name.
              • Set Parent Identifier to Parent Quote Line Item ID, and Record Identifier to Quote Line Item ID to configure the hierarchy configuration.
          8. Configure a Composite Writeback node:
            Sequence defines how data is nested in the final JSON. Process parent nodes before child nodes.
            Composite Writeback configuration showing sequence Quote to Quote Line Group to Quote Line Item.
            1. Set Target Type to JSON
            2. Define the sequence as Quote → Quote Line Group → Quote Line Item
            3. Map relationships:
              This mapping links datasets across levels. Without it, child nodes don’t attach to their correct parent hierarchy.
              • Parent Field: Quote ID → Node Field: Parent Reference (Quote Line Group)
              • Parent Field: Quote Line Group ID → Node Field: Parent Reference (Quote Line Item)
          9. Save and activate the transformation.
            Data Processing Engine flow showing data source, subtype nodes, writebacks, and final output.
          10. Generate a document using the transformation.
            1. In the document template, for Context Transformation Name, select the transformation.
            2. Make sure the template is configured to use nested structures such as related records and children to render hierarchy levels.
              DPE outputs a hierarchy in JSON by using related records (first level) and children (nested levels). The template must match this structure to render correctly.
            3. Configure the template to show grouped sections by using the grouping field as the header.
              The template must reference the calculated field by using the alias defined in the formula node. The alias must exactly match the field name in the JSON output.
            4. For the input, enter the Quote ID.
              The Quote ID acts as the Context Instance Identifier to retrieve and transform data at run time.
            5. Generate the document.
              Template output with the multilevel hierarchy.
           
          Cargando
          Salesforce Help | Article