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

 
Davy Capiau
Reply

Hi Dmitrij,

In the link comments I read: 'The missed group-product relations will be removed, there is no functionality to remove the relations for only the products from the import.'

In my import integration activity I only updated the delta's. So if I implement this code and only update that specific product. What would be the effect? It's not 100% clear to me due to that comment.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Davy,
The comment relates to the default behavior but the PartialUpdate feature works in this way:

When PartialUpdate is true then the product-group relations for the imported products are handled by the "Groups" column
fx when you have 2 groups: g1(with products: g1p1) and g2(with product g2p1) and importing product g1p1 with Groups "g2" then
this product should be moved to the "g2" and removed from "g1"
all other products/relations that are not in the import should be kept without changes
BR, Dmitrij

Votes for this answer: 1

 

You must be logged in to post in the forum