@RTTPAAKDE
You can use “mass_update” XML
Below is a generic structure. You can search the community for more examples
<mass_update_product>
<hierarchy_select>
<primary_table>product</primary_table>
<attrs>
<attr>product.product_id</attr>
</attrs>
<from>
<table>product</table>
</from>
<where>
<data_constraint>
<constraint>
<left_operand>product.product_type</left_operand>
<operator>eq</operator>
<right_operand>MY_TYPE</right_operand>
</constraint>
</data_constraint>
</where>
</hierarchy_select>
<product>
<MY_DATE>SOME_VLAUE</MY_DATE>
<update />
</product>
<transaction_size>100</transaction_size>
<synchronous>Y</synchronous>
</mass_update_product>
Cheers!
Hi,
Thank you for suggestion!
Regards,
Akshay.
Hi @Shneor Cheshin ,
If I want to do mass insert for example creation of new product additional to existing product with new coverage_start_dt and coverage_end_dt. How i need to do it?
I tried like changing XML to insertbutdid not work.
Do you have any suggestions? Thanks for help!
Regards,
Akshay
<mass_update_product>
<hierarchy_select>
<primary_table>product</primary_table>
<attrs>
<attr>product.product_id</attr>
</attrs>
<from>
<table>product</table>
</from>
<where>
<data_constraint>
<constraint>
<left_operand>product.product_type</left_operand>
<operator>eq</operator>
<right_operand>MY_TYPE</right_operand>
</constraint> </data_constraint>
</where>
</hierarchy_select>
<product>
<MY_DATE>SOME_VLAUE</MY_DATE>
<insert/>
</product>
<transaction_size>100</transaction_size>
<synchronous>Y</synchronous>
</mass_update_product>
Hi @RTTPAAKDE
Mass Insert is NOT supported by baseline product.
Cheers!
Hi @Shneor Cheshin ,
Thanks!
Hi @Shneor Cheshin ,
If i want to update multiple products id’s, which operator i use in constraint in where clause
the below is example what i tried:
<where>
<data_constraint>
<constraint>
<left_operand>product_pm.product_id</left_operand>
<operator>eq</operator>
<right_operand>12345</right_operand>
</constraint>
<constraint>
<left_operand>product_pm.product_id</left_operand>
<operator>eq</operator>
<right_operand>67890</right_operand>
</constraint>
</data_constraint>
</where>
but not working i get response as:
<response>
Mass update complete.
For update, 0 records were successfully updated and 0 were skipped because of errors.</response>
It would be great if you help me!
Thanks,
Akshay.
@RTTPAAKDE
If you wish to update multiple records, I would recommend using other fields in your where clause.
What you are trying to select is product id 12345 and 67890, which is wrong.
If you wish to provide the IDs, you need an ‘OR’ condition.
<data_constraint>
<constraint>
...
</constraint>
<or/>
<constraint>
...
</constraint>
</data_constraint>
However, it is better to select records with a different field to compare values.
Cheers!