Welcome to the Exact Product Blog

On this blog we will cover stories from all around the Exact ecosystem.

Posts Tagged ‘schema’

Word Merge tricks: Create professional letters and emails using all data available in your system

Written by Martin Ortgiess on . Posted in Exact Synergy

Exact Synergy offers the possibility the send (bulk)-emails and -letters. This has been possible for years already, but last year this mechanism was completely renewed. This new Word Merge is by default activated for new customers. Customers already using Synergy for over a year can also benefit from these new possibilities. Switching to this new mechanism is quite straighforward and the benefits are great. For more information go to this video or this blog post.

With the new Word Merge, letter- and email-templates can be made in MS Word. In MS Word, the template creator selects which schema to use, where a schema is nothing more than a group of merge fields. Merge fields from the selected template(s) can be dragged into the MS Word template. At the moment a user is creating a letter or sending an email to a customer or colleague, these merge fields will be filled with the correct corresponding data.

Exact delivers a huge set of merge fields by default which are stored in one big schema. Administrators can create their own schemas with their own set of merge fields. He can use default merge fields or add new merge fields to this schema: field that were not delivered by default. How this works, is described in the example below. Credits for this example go to my colleagues Sanja Djuretic and Mahyar Shojaeifar.

A real life example

In this example we will extend a schema used to create a Word Merge template for this scenario: For the request type “I Need” a “TextFreeField4” is linked to the item. In this example an item with a code 80003 and description Flowers is selected in specific request, as shown in the following screenshot.1picture


When the WordMerge template for the letter from Request is created using Exact General schema then mapping TextFreeField4 to the content control in template document will result in showing item code, here 80003, in the final letter. 2picture 

– If user wants to show description of the TextFreeField4, in this example Flowers, than it is necessary to extend the schema used for xml mapping by means of adding new metadata and creating new schema related to the new metadata.

One can get new metadata, here item description of the “TextFreeField4” (“freetextfield_04″ DB name), in 2 different ways:
• By sub query:
<Field name=”ItemDescFromTextFreeField4″ sql=”(SELECT Description FROM Items WHERE ItemCode = {0}.freetextfield_04)” />
• By using join:
<Join name=”ItemFromTextFreeField4″ lookUpEntity=”Items” lookUpJoinType=”left” fieldName=”freetextfield_04″ lookUpKey=”Code”  />

Note that using join it is possible to get more information from the Item while sub query returns only one value, description in here.

-Following section shows the content of new metadata file and schema and explains how and where to save these files.  
These files should be created and saved according to the naming conventions and in the folders as described in the document How to: Extending Word Merge schemas

1.Save following metadata as “MailMergeTags.Req.xml” file in the “xml” folder of the Synergy “Exact WordMerge Integrator” installation:

<?xml version=”1.0″ encoding=”utf-8″?>
    <Entity name=”Request”>
        <Field name=”ItemDescFromTextFreeField4″ sql=”(SELECT Description FROM Items WHERE ItemCode = {0}.freetextfield_04)” />
        <Join name=”ItemFromTextFreeField4″ lookUpEntity=”Items” lookUpJoinType=”left” fieldName=”freetextfield_04″ lookUpKey=”Code”  />

2.Save following text as “Req.Schema.xml“. You can save it in the same folder as the above metadata file is saved.

<eExact  xmlns=”Exact extended Request schema”>
    <ItemDescFromTextFreeField4>Description of item, stored in request free text field no.4</ItemDescFromTextFreeField4>

3.Upload new schema to the Synergy – click on the Documents menu in the Word Merge section on the Schemas and select New Schema. Choose Request as a group.
Note: It is not necessary to upload new schema to Synergy before you use it to create the Word Merge template but in case that you want to share it with other users we recommend the upload.

-Next step is to update the existing Word document used for Request letter template with the free field description field from the new schema.
This can be achieved by adding new schema in the Xml Mapping pane – add new Custom XML Part –  and then adding new description field to the template document as shown below.
Save and upload this document template to Synergy and you are ready to use it!

The letter created from the Request using latest template (created with the field from extended schema) will contain description for the item selected in related TextFreeField4. 3picture

 Our customers and partner can go to this document in the customer portal, where attached is a simple app Word2SQLApp which gets the template, extracts used tags and output final SQL; it can help to understand how template will behave during merge process.

Furthermore, attached here are extended metadata file, schema and template used as examples in this document.

Introduction of the new Word Merge

Written by Martin Ortgiess on . Posted in Exact Synergy

Easily send a predefined email or letter in corporate style. That was the goal we had in mind when designing the new Word Merge functionality. And… I think we succeeded!

With Exact Synergy Enterprise product update 249, the first version of the new Word Merge will become generally available. It is the successor of current merge functionality in Exact Synergy Enterprise (HTML and Word Merge) and offers a wide range of improvements. (video)

For every company it is of great significance that documents that are sent to external stakeholders or employees are professional and follow the guidelines of your company. There are a couple of things that are important when you want to achieve this, where again the most crucial one is that it should be simple to create a letter or send an email. To realize this, the screen where ‘it all happens’ must be clear and to the point. The key elements here are the number and quality of templates available. The number of templates should be kept to a minimum, so that the end user can easily pick the right one. The quality of the templates should be guaranteed. The new Word Merge functionality takes care of all of this.

The new Word Merge offers the following features:

– You can easily create a letter or send an email

  • Easy screen from where you can send email or create a letter
  • Templates are available based on roles and action
  • User can select to save a copy of the sent email to Exact Synergy Enterprise
  • Server side merging: good performance and no tools needed on client machine

– Templates

  • Define who can use which templates
  • Define who can maintain which templates
  • Template settings, to define which templates can be used from where (like: send email from account card or create letter from person search)
  • Set language of the template
  • Templates are made in MS Word

– Schema

  • A schema is needed to make a template. It contains a set of merge tags which can be dragged into the template. While performing the merge, these tags will be replaced by the actual value (like {account name} = Exact International Development)
  • Exact delivers default schemas. The merge tags in the schema are comparable with the merge fields currently in HTML merge
  • Consultants can easily extend the schema and add new fields
  • Consultants can make their own schema’s
  • Define who can use which schema

UPDATED: In product update 249, Exact introduces a first version of the new Word Merge functionality. This first version is limited to single merge actions only. This means that you can perform a Word Merge from account-, contact-, person- and request-card. All other merge functionality, like merge from account-, request- and person-search will remain as is. We plan to have most used Word Merge functionality available as of product update 250 which will become available second half 2012.

Word Merge is the new standard

Written by Martin Ortgiess on . Posted in Exact Synergy

Easily send a predefined email or letter in corporate style. That was the goal we had in mind when designing the new Word Merge functionality. And… I think we succeeded!

This is how I introduced Word Merge for Product Update 249 in April this year. Since then, we have customers positively working with this new feature. We continued to improve Word Merge in Product Update 250 by adding new features and made it even easier to make a letter or send an email.

Based on the positive feedback and rich functionality that the New Word Merge offers, it will be our standard Merge offering as of Product update 250. This means that newly created administrations will have ‘new Word Merge’ only! Existing administrations will have the option to use ‘New Word Merge’.

New in product update 250:

New menus and functions

  • Create letters for, or Send email messages to, a group of recipients based on Account-, Contact person, People- and Request search  result
  • Create letter or send email from project card
  • Creating a Quotation in MS Word is heavily extended with the new Word Merge implemented. Item pictures can be added to item lines and much more information (tags) is available to be used in the template.
  • Send automated emails related to customer- and reseller portal:
    • Portal access activation
    • Reset password
    • Portal access deactivation
  • Give your letter or email a unique reference number which can be easily traced back:
    • Setting to determine the format of reference number
    • the reference number is one of the fields that can be used to make your template (tag)
    • the reference number can be published in the Synergy document description, which make it easy to trace it back
  • Send email messages including attachments: When sending an email, the user can select a Synergy document. All attachments linked to this document, will become email attachments

Improvements on existing features

  • User can add recurring lines to a template. This means that you can add information to a template that you normally would store in a table. Think about quotation item lines, an overview of all roles linked to a person or a list of all members of a project
  • The process of creating a letter or sending an email is improved and simplified.
    • The user first selects a template from a list.
    • After selection the template, the user can fill in related information that is defined for this template. The options the user has, is set by the template creator and is template specific. Think about:
      • User must fill in the contact person to send the email, where other fields will not appear for this template
      • Fields can be set mandatory and/or editable
      • Defaults are already prefilled
  • You can use all information available in Synergy on your templates: just extend your merge schema with the fields needed


  • ‘Old’ Merge functionality is no longer offered in new databases
  • Support Word Merge in combination with multiple Synergy environments on 1 server
  • Support 64 bit Synergy environments
  • Support basic authentication