0 votes

Dear all,

I need to change some part of flexmail integration for a customer, like adding the contact title to the contact sent to flexmail.

I looked at the sample custom and the buildnotes of Efficy 11, but I didn't find the proper way to just change the "fields.js" file

is it like the macro files, can I just copy past the fields.js to my custom folder "serverjs/flexmail" or do I have to completly copy the flexmail folder in my custom to do the modification ?

Best Regards,
Stéphane

asked in WorkFlow / Serverscript by (1.8k points)

1 Answer

+1 vote
Best answer

Hi Stephane,

You don't have to completly copy the flexmail folder.

I will explain this with a little example.

To synchronize the field PHONE1 with the EmailAddressType phone:

  1. Create in your custom folder the following folders "serverjs/flexmail"
  2. Copy+Past the fields.js file in "YourCustom/serverjs/flexmail"
  3. Customize the file with the following content:

    SynchroFields = [
    {
        EfficyField: 'FIRSTNAME',
        ExtField: 'name',
        FullSynchro: true
    },
    {
        EfficyField: 'NAME',
        ExtField: 'surname',
        FullSynchro: true
    },
    {
        EfficyField: 'MAILINGCODE',
        ExtField: 'free_field_5',
        FullSynchro: false
    },
    {
        EfficyField: 'MIDDLENAME',
        ExtField: 'free_field_6',
        FullSynchro: false
    },
    {
        EfficyField: 'PHONE1',
        ExtField: 'phone',
        FullSynchro: true
    }
    ];
    
  4. In the task scheduler, make sure that your custom folder is well defined (example for the custom folder "default")
    advanced window

The next time a contact is transfered from Efficy to Flexmail, the PHONE1 will be copied to Flexmail EmailAddressType property "phone".

The next version of the flexmail gdpr integration (in Efficy 11.2) will synchronise in standard a lot more fields.

answered by (572 points)
selected by
Thank you Alain, just one last question : I also changed the "efficyImplementation.js" in order to use the table R_CONTACTS instead of CONTACTS should I change the @import path or will they be known when running the schedule script ?

Today I let the standard one for instance: @import "flexmail/constants";

But since I am in my custom I don't know if the serverjs will know where to look for this file ?
Hi Stephane, you don't have to change the import path. It should work with the standard one. (the task scheduler will check at each import if a custom js is available)
1,167 questions
1,425 answers
1,717 comments
325 users