on 07-01-2016 6:42 PM
I have been asked to add few fields in the structure of an incoming xml file. I have added the fields and completed the mapping. the changes are visible even in the adapter engine payload. after this it does for FCC. here the only task of FCC is seperate the fields with ## and send a csv file. Out of the 4 fields added , 2 are visible and 2 are not in the csv file. Also find data which were initially sent are now missing.
incoming payload with new field in bold:
<?xml version="1.0" encoding="utf-8"?>
<Orders LastProcessingTime="2016-06-18T00:45:00Z" ExportStartTime="2016-06-19T00:45:00Z" ExportType="Incremental" ExportCorrelationId="I2016-06-19T00-45-00" FileNumber="1" LastExportFile="false" xmlns="http://schemas.hema.nl/exports/2014/03/Orders">
<Order>
<Number>111111</Number>
<ProfileId>a11111111111</ProfileId>
<Currency>EUR</Currency>
<Type>Default</Type>
<Status>Completed</Status>
<ShippingTotal>0.0000</ShippingTotal>
<OrderOrigin>R</OrderOrigin>
<Discount>12.3</Discount>
<Sold>n</SoldA>
<ChannelId/>
<LastModified>2016-06-18T14:27:07Z</LastModified>
<Created>2016-05-24T08:20:04Z</Created>
<SubTotal>5.5000</SubTotal>
<Total>5.5000</Total>
<LineItems>
<LineItem>
<LineItemId>2134567</LineItemId>
<VariantId>33329314</VariantId>
<Quantity>3.0000</Quantity>
<RegularPrice>2.7500</RegularPrice>
<DiscountAmount>2.7500</DiscountAmount>
<OrderDiscountAmount>0.0000</OrderDiscountAmount>
<ListPrice>2.7500</ListPrice>
<TotalPriceWithDiscount>5.5000</TotalPriceWithDiscount>
<Points>12</Points>
<DownPayment>0.0000</DownPaymentAmount>
<Status>Completed</Status>
<ShippingMethod>store</ShippingMethod>
<Category>xyz</Category>
<Name>xyz</Name>
<SupplierCode>D</SupplierCode>
<TrackAndTrace>
<DeliveryDate>2016-05-26</DeliveryDate>
<Amount>3</Amount>
</TrackAndTrace>
<Discounts>
<Discount>
<LineItemId>123456</LineItemId>
<Amount>2.7500</Amount>
<Value>100.0000</Value>
<Name>xyz</Name>
<DisplayName>xyaz</DisplayName>
<VoucherId>11</VoucherId>
<PromoCode/>
</Discount>
</Discounts>
<DeliveryAddress>
<Title/>
<Gender>Unknown</Gender>
<FirstName/>
<LastName/>
<Organization/>
<Line1>b</Line1>
<Line2/>
<Line3/>
<City>c</City>
<CountryName>a</CountryName>
<PostalCode>8102 CR</PostalCode>
<Email/>
<KialaPointId/>
<StoreNumber>111</StoreNumber>
</DeliveryAddress>
</LineItem>
</LineItems>
<MediatorPayments/>
<ShippingDiscounts/>
</Order>
</Orders>
Mapping done:
<LineItem>
<LineItemId>
<xsl:value-of select="ns1:LineItemId"/>
</LineItemId>
<VariantId>
<xsl:value-of select="ns1:VariantId"/>
</VariantId>
.
.
.
<Points>
<xsl:value-of select="ns1:Points"/>
</Points>
.
.
.
<Discount>
<LineItemID>
<xsl:value-of select="ns1:Discounts/ns1:Discount[1]/ns1:LineItemId"/>
</LineItemID>
.
.
.
<VoucherId>
<xsl:value-of select="ns1:Discounts/ns1:Discount[1]/ns1:VoucherId"/>
</VoucherId>
</Discount>
Out come in adapter engine payload:
2134567333293143.002.752.750.002.755.50120.00CompletedstorexyzxyzD2016-05-263.001234562.75100.00xyzxyaz11unknownbca258102CR111
so all the 4 highlighted field in line item are updated . then there is a FCC:
LineItem.fieldSeparator | ## |
LineItem.addHeaderLine | 0 |
the csv file created after this doesnot contain all the neccessary data:
2134567##33329314##3.00##2.75##2.75##0.00##2.75##5.50##12##0.00##Completed##store##xyz##xyz##D##2016-05-26##3.00##123456####Unknown##########b######c##a########111
Hello Priya,
I can see 2 lineitems in the xml and the same in the CSV.
What exactly is missing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.