Interaction call returning 0 propositions when maxCount is set to 0008

To resolve the Campaign Classic issue where an interaction call returns 0 propositions when maxCount attribute is set to 0008 or more, modify the Interaction.js library as described in this article.

Description description


Adobe Campaign Classic


Interaction call returns 0 propositions when maxCount attribute is set to 0008 or more than that in the SOAP payload.

In the below payload, the <urn:maxCount>00008</urn:maxCount> tag takes a numeric value.

If you use a trailing 0, it works normally until 0007 (meaning 0000,0001,0002,…0007 work normally).

But if you use 0008 and above, it returns 0 propositions.

Interaction call payload:

<soapenv:Envelope xmlns:soapenv="" xmlns:urn="urn:nms:interaction">
<!--Recipient Id
<!-Account Id->
<!--Contact Id
<!-You may enter ANY elements at this point->
<interaction onCallOfferFlg="Y" orgName="to be filled"/>


https://<Server URL>/interaction/liveRcp/<offer>


On checking the Interaction.js library, the parseInt() function is used to parse the maxCount value to Integer.

This parseInt() function returns a decimal value by default.

var iAskedPropositionCount = parseInt(soapMethod.::maxCount.toString());*

This JS function inherits a property from C and C++ that if you pass a value in parseInt() which starts with 0, it uses base-8 to return the value.

Since base-8 does not accept numeral greater than 7, when you pass 0008 or more, it converts it into 0 or NaN hence no proposition is returned.

If in maxCount, you pass 8 instead of 0008, results in proposition in the response to the SOAP call.

Resolution resolution

Modify the Interaction.js library and use:

var iAskedPropositionCount = parseInt(soapMethod.::maxCount.toString(),10);*

so that it works for all numbers.