ETL Loader to Do Price Updates

Anyone successfully used the ETL loader to do price updates.

I was attempting to preplan a June price update, I used SQL to set a enddate on our current prices. 

Then I was going to use a OPENVPMS price loader to add a new price and set the start date

This is what I came up with

 

  Feild NAme Map to Exclude Null DefaultValue Value
 
COSTPRICE <productPrice.unitPrice>cost Y N  
  NewPrice <productPrice.unitPrice>price Y N  
  NewPriceStartDate <productPrice.unitPrice>fromDate Y N  
  PRICELOADERID $product_id<$archetype>price[0] N N <productPrice.unitPrice>$value

Of course it doesnt work, and I am assuming its becuase I cant map to products I havent loaded through the loader to start with, ie products that dont have a ETL loader Id in the ETL table.

What I am attempting to do is reference the product_id directly and also vary the archetype between product.medication and product.services.

I can easily do the update simply updating the existing price and removing the endDate, but I wanted something really nice I could preplan as I believe the intention of the original setup was with having dated prices.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: ETL Loader to Do Price Updates

Just a quick update - I made a work around using the a lookup on the product identity table (where I had stored my old barcodes) however for new products this doesnt work, hence my question 

is there anyway of directly referencing an archetype object by ID, and having the loader create the link between the existing product object and the new price object.

Cheers

Ben

Re: ETL Loader to Do Price Updates

Only if you know the existing product's archetype.

E.g. $ID refers to a medication product:

 

Field name Map to
PRICE $ID<product.medication>prices[0]<productPrice.unitPrice>price

For multiple product types, you'll need have an OpenVPMS Loader steps per product type, and use filters to direct the appropriate rows to the right OpenVPMS Loader.

Syndicate content