Developer forum

Forum » Integration » Group assignment overwrite with ecomprovider - DW10

Group assignment overwrite with ecomprovider - DW10

Davy Capiau
Reply

Hi all,

I'm working on an integration activity in DW10 using the Ecomprovider, and I want to manage group records more strictly.

Goal:
I want to overwrite all existing group records with just one record that has a specific Group ID.

What I tried:
I mapped the groups field to a constant value (the specific ID) in the Ecomprovider mapping.
Result: It added the new record to the existing ones instead of replacing them.

Question:
Is there a better way to overwrite the existing group records efficiently?
 


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Davy,
it is not clear what is your problem. Is that the product-group relations that are created are wrong?
Or do you need the EcomGroup itself to be updated with some new data?
If it is related to the product group relations try to check if the Group with GroupId = "Group205" exists.
You can also un-check the option "Create missing groups" then new groups will not be created.
BR, Dmitrij

 
Davy Capiau
Reply

Hi Dmitriy,

I'm trying to overwrite existing product group relations with a single, predefined group relation. The group I'm targeting has the ID GROUP205, and it's already created in the system.

In my setup, I mapped the groups field to a constant value containing this ID, expecting that the EcomProvider would interpret this as a directive to remove all other group relations and retain only this one. However, it seems that’s not happening—the existing relations remain untouched.

Is there a way to achieve this clean overwrite without introducing a separate source file or setting up a more complex integration flow? Ideally, I’d like to keep the solution as simple and maintainable as possible.

Thanks in advance for any insights!

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Davy,
it is related to the Partial update feature described here. To use it you need to add the <config> section to your source xmll file like that:
<?xml version="1.0" encoding="utf-8"?>
<tables>
<config>
    <destination>
        <setting field="PartialUpdate">true</setting>
    </destination>
</config>
  <table tableName="EcomProducts">
    <item table="EcomProducts">
      <column columnName="ProductID"><![CDATA[PROD112]]></column>
      <column columnName="ProductLanguageID"><![CDATA[DAN]]></column>
      <column columnName="ProductVariantID"><![CDATA[]]></column>
      <column columnName="ProductNumber"><![CDATA[]]></column>
      <column columnName="ProductName"><![CDATA[s2g1p1]]></column>
      <column columnName="Groups"><![CDATA["GROUP64"]]></column>
    </item>   
  </table>
</tables>
BR, Dmitrij

 

You must be logged in to post in the forum