AnsweredAssumed Answered

Sum function not working properly.

Question asked by gouthamr388096 on Dec 1, 2017

I am having issues with sum function. The below is XML I have. I am combining all XML records into single document and then I am passing amount value to sum function, but we get the following error. I believe it is the XML structure (shown below) is the cause of it. Can anyone provide feedback?

 

2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function: 1- Input[2:Value to Sum, 21.5400]
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function Step: 1:Sum SUM- Input[3:Reset Value, ]
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function Step: 1:Sum
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function Execution: Sum- Output[4:Result, 21.5400]
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function: 1 SUM OUTPUT- Output Element[amount], Value[21.5400]
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function: 1
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function: 1- Input[2:Value to Sum, 10.7600]
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function Step: 1:Sum SUM- Input[3:Reset Value, ]
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function Step: 1:Sum
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function Execution: Sum- Output[4:Result, 32.3000]
2017-12-01 02:22:22 PM
FINEST
Map
Sum Gift Card Redeemed Amount
Function: 1 SUM OUTPUT- Output Element[amount], Value[32.3000]
2017-12-01 02:22:22 PM
SEVERE
Map
Sum Gift Card Redeemed Amount
No data produced from map 'Sum Gift Card Redeemed Amount', please check source profile and make sure it matches source data.

 

XML I have is below

 

<bill_to>
<customer>
<invoice_items>
<transactions>
<transaction>
<attributes/>
<guid>815a0d10-439d-4ea9-b8d9-a8320070f59a</guid>
<type_id>1</type_id>
<date>2017-12-01T06:15:56.71Z</date>
<amount>21.5400</amount>
<commission_amount>0.0000</commission_amount>
<commission_rate>0.0000</commission_rate>
<cr_dt>2017-11-21T06:51:16.35Z</cr_dt>
<lu_dt>2017-12-01T06:15:57.437Z</lu_dt>
<payment/>  --- > Please note that in the first transaction element payment element comes like so.
</transaction>
<transaction>
<attributes/>
<guid>ef78bdac-3933-4cf5-8882-a83c006742b6</guid>
<reference_guid>e2543231-8c01-41e6-8ec7-a83c006742b6</reference_guid>
<type_id>10</type_id>
<date>2017-12-01T06:15:57.113Z</date>
<description>P1194</description>
<amount>21.5400</amount>
<commission_amount>0.0000</commission_amount>
<commission_rate>0.0000</commission_rate>
<cr_dt>2017-12-01T06:15:57.617Z</cr_dt>
<lu_dt>2017-12-01T06:15:57.617Z</lu_dt>
<payment> -- In the second iteration of transaction I get payment as we need and we are passing the amount field below to sum function.
<id>P1194</id>
<method_id>15</method_id>
<method_description>Gift Card</method_description>
<card_number_masked>XXXX-XXXX-XXXX-0965</card_number_masked>
<transaction_cd>00001530</transaction_cd>
<transaction_description>Sale - Approved No Processor</transaction_description>
<amount>21.5400</amount>
<captured>true</captured>
</payment>
</transaction>
</transactions>
<price_adjustments/>

Outcomes