The first step to start generating documents for products is to create a document template. If you are unable to do this yourself, we at iSYS are ready to help you create a document template based on your design preferences.

If you have the necessary skills, you can also create the template yourself and upload it directly into feed®. If you have an existing template available, you can easily make adjustments and changes to it. However, remember to back up the template before making changes, so you have a working copy in case you need to revert to the old version.

Create a document template

The feed® Document Generation module uses Word templates (.docx files) as the basis for generating PDF documents. Therefore, to create a document template, you need a word processing tool that can save the document as a Word file (.docx).
If you don't have Word from the Office package available, LibreOffice is a good alternative.


How to create a template to integrate information from product cards in feed® is a course in itself. We can assist in creating a template for you based on design suggestions, or if you prefer to learn it yourself, take a look at the user documentation available on Docmosis:


Docmosis User Documentation

Ensure that the selection is set to Tornado and the document version is (Latest) to access the most up-to-date documentation.

Look for the Template Guide (if you're new to Docmosis) or the Quick Reference (if you prefer a concise functionality overview).

Important information

Be aware that there may be functionality described in the user documentation that is not yet supported for integration from feed®.

We will be expanding support for desired and necessary functionality in the future, so if there is something you are missing, please give us feedback.

Some simple tips to get started:

  • It is important to know that the names of the fields you want to map from feed doesn't need to have the same name as in the DocPro template.

  • You also do not need import codes in the feed attributes you want to map to Docmosis. If you later add an import code or change the name of the feed attribute, it will still be linked in the mapping.

  • The field names (variable names) you use in the template cannot contain spaces.

  • The "variable" naming you set in the DocMosis template is the field that appears in the feed mapping that you link feed texts, attributes, feed header data, relationships, etc. to.

  • The "variable names in the template are sorted alphabetically in the mapping. We recommend structuring names based on master data type, then underscore and logical field name so you can quickly find it in feed.
    How you do this is entirely up to you, but it can save you time on linking work afterward, as the variable names are sorted alphabetically.

Suggestion:

  • ATTR_AttributeGroup_Attribute

  • MR_Mediarolename
  • PKG_Packagename_Attribute

  • PRODUCT_FieldName_languagecode (if text)

  • TXT_Textname_languagecode

Variables: To create a dynamic field in the template that appears in the mapping document for linking to feed®, use the following syntax: <<My_variable_name>> (see suggested naming conventions above).

This is how it will appear when you have added the template in feed and are mapping the fields to feed.


Images: If you need to retrieve an image from the product card in feed®, you must first add an image to the template in the desired location and adjust the size.

  • The image you add is not the one that will be displayed. It is only the frame/"placeholder" for the image to be inserted.

  • Consider the height-to-width ratio of what will normally go into the placeholder. The "placeholder" sets the boundary for how much space the feed image is allowed to occupy in the template.

  • If you insert a wide image but normally receive tall images, there will be a lot of unused space on the sides.

  • You can stretch the image, but that will cause distortions that generally do not look good (more on this below).


After adding the image, follow these steps to create a DocPro field in the mapping that can be linked to feed media role:

Word:

  1. Select the image.

  2. Click "Insert."

  3. Click "Bookmark."

  4. The bookmark name must follow a specific naming standard (important!!).

    1. Start with the function: "imgfit_" or "imgstretch_" before inserting the variable name that appears as the DocPro name you will link to the media role.

      1. Choose whether the image should stretch (distort) to fill every edge of the placeholder (imgstretch_),

      2. or if it should maintain height/width proportions (imgfit_) and stop at the first boundary of the placeholder.

    2. After writing imgfit_ or imgstretch_, enter the name that will appear in the mapping. It is advisable to write MEDIAROLE_ or MR_ followed by the media role name.


LibreOffice:

  1. Double-click the image.

  2. Go to the Options tab if it does not open by default.

  3. Enter imgfit_ or imgstretch_ followed by the variable name you want to use (as explained above in the Word section), then click OK to activate.


Important: The mapped media role retrieves only the first image in feed. If you have multiple placeholders with the same media role mapped, the same image will be displayed multiple times.


Max 5MB images

An image used in a template during generation can be a maximum of 5MB. If you have large images uploaded to products that will be used, it may be necessary to define a smaller format and use this in the mapping instead of the original.


Conditional <<cs_>>:

Content between the opening element <<cs_and the closing element is included or excluded depending on the value associated with “name” or the expression “expr”. The end tag must match exactly, or may be anonymous: <<es_>>.

<<cs_my_variable>> (choose one attribute, text to map to this element. Only the value will show, not the field name. If the value is blank it will not appear).

<<cs_{my_variable}>>(Let you add attribute and hardcoded text. If the product has a blank/null value on the attribute nothing will appear (hardcoded text or value).

  •  example: 
    <<cs_{f_pak_gtin!=null&&f_pak_gtin!=’’}>>
    F-Pak
    GTIN: <<f_pak_gtin>>
    <<es_>>
  • The Syntax example above lets you hide attributes with blank values (null values). The setup above will show the hardcoded text "F-Pak", then a line break with the hardcoded text "GTIN:" followed by the GTIN value. If blank, no text or value will be shown.  


 

Dynamic paragraph:

if you map a text or attribute in your template, and you type a header text for it in the template, you don't want that header to show if the text or attribute value is empty on the product. 

you can use the <<op:name>> syntax to accomplish this. 


  • example: 

Product description (header)

<<op:productDescription>> (syntax:fieldname)

Incorrect: If you press enter on the keyboard after typing the header, the header will not be removed if the product has no value in the text/attribute. 

Correct: If you press SHIFT+Enter on the keyboard after typing the header, you will create a soft break and the <<op:productDescription>> syntax will be within the same paragraph. Doing so will dynamically remove both the header and the text/attribute within the document paragraph.


Dynamic rows:

If a mapped attribute in a row doesn't have any value on a product, you can dynamically hide it by using the <<cr_ syntax. 

You need to have a start and end syntax on each attribute as shown in the example below. 

Start syntax: <<cr_{ATTRIBUTE!=null&&ATTRIBUTE!=’’}>>

End syntax: <<er_>>


Example: 

DetailsValues

<<cr_{weight!=null&&weight!=’’}>>
Weight<<weight>>

<<er_>>

<<cr_{lenght!=null&&length!=''}>>
Lenght<<length>>

<<er_>>


Repeating Rows in Table

Start Syntax: <<rr_NAME[*]>>

End Syntax: <<er_>>

The [*] in the start syntax indicates that it includes all available rows.

Between the start and end syntax, you insert the master data you want to display in the table columns.


List Mapping

When the rr_ syntax is used in the document template, the "Lists" tab will be available under linking/mapping.

With the rr_ syntax applied to "lists", you can link:

  • Variants

  • ETIM Attributes

  • Relationships

  • Attribute Group (attributes within a group)

Depending on what you choose to link, additional mapping options may appear after the initial linking.


For Example:

ETIM Attribute: You must then select the ETIM version.

Attribute Group: You must choose which attribute group to link to, and after this, you can map the following fields to be displayed in the table:

  • Attribute Group Name

  • Attribute Name

  • Value (in the field)

  • Unit Name (if a unit is set on the attribute, the name of the unit will be shown—language-dependent): kilogram, meter, millimeter...

  • Symbol (if a unit is set on the attribute, the unit abbreviation will be shown—language-independent): kg, m, mm...


Examples:

Variants:

 

Product Number

Name

Size

Color

RRP USD

<<rr_variants[*]>>







<<PRODUCT_productNO_value>>

<<PRODUCT_Name_value>>

<<ATR_Size_value>>

<<ATR_Color_value>>

<<ATR_PriceUSD_value>>

<<er_>>







Relations:


Product number

Name

RRP USD

<<rr_relations[*]>>

 

 

 


<<PRODUCT_productNO_value>>

<<PRODUCT_Name_value>>

<<ATR_PriceUSD_value>>

<<er_>>





Attributegroupes:

To exclude attributes that have no value on the product, you can insert a cr_ syntax with a conditional value that excludes fields containing 0 characters.

When using this syntax, remember to include an additional "end syntax".


Technical details

Value

<<rr_ATTRgroup_technicaldetails[*]>>


<<cr_{length(ATTRvalue)>0}>>


<<ATTRname>>

<<ATTRvalue>> <<symbol>>

<<er_>>


<<er_>>


ETIM-features in DocPro

Add your variants to a DocPro document using the "repeating row" segment as shown in the example below.
The way it works is that a table is set up where the first line indicates that a repeating row will follow by starting the tag with "rr_", which stands for Repeating Row.
[*] states that it includes all. 

Then comes the line that will be repeated. In the example below,  id, name, valueId, value, unitName and unitAbbr are added to the line that will be repeated for all ETIM features for a given version for the product.
For ending the reapeating row use "er_" for End Row.

Name

Value

<<rr_etim_features[*]>>

 

<<id>> - <<name>>

<<valueId>> : <<value>> <<unitName>> (<<unitAbbr>>)

<<er_>>



In the mapping overview, you will see "etim_features" as a field that can be mapped.


In the example below it is mapped to ETIM features for version 9.

When this field is mapped, the underlying fields will become visible and available for mapping. These underlying fields will then receive values from the features.


Date:

<<{dateFormat($nowUTC, 'EEEE, dd MMMM yyyy')}>>

    • Syntax for timestamp that will present the date when the document was created, or last updated. 

Upload template







Under "Integrations" in the main menu, you will find "Document Generation" if you have access to the module.

By clicking on this, you will be taken to the screen for setting up a document configuration. In the upper right corner, there is also an icon for uploading and maintaining your document templates.


Here you will see an overview of existing templates. To upload a new template, click on the icon or use the shortcut 'C'. You can then upload the template you have created by dropping it into the canvas or by clicking on the folder icon to locate the file on your PC. 


  • No labels