Skip to main content

Amazon IO Error - "Please enter a value for amount."



  • Andrew


    I got this error on the Amazon MFN flow, so I tried using this formula, but it failed again.

    This was on an Amazon 'replacement' shipment. There is no data in the field on the retry data for {{OrderItem[*].ItemPrice. Amount}}, so the flow gave this error:

    "Failed to add Amazon Order# 111-2111118-2111111. Could not compile handle bar \"{{#if $.OrderItem.[0].ItemPrice. Amount}}{{$.OrderItem[*]. ItemPrice.Amount}} {{else}}0{{/if}}\" because \"Parse error on line 1:\n...mPrice. Amount}}{{$.OrderItem[*]. ItemPr\n-----------------------^\nExpecting 'ID', got 'INVALID'\" .Please correct and retry"

    What can I do in this scenario? 

  • Jeffery Hill Senior Solutions Consultant
    Celigo University Level 4: Legendary

    For item amount:

    {{#if $.OrderItem[*].ItemPrice.Amount}}{{$.OrderItem[*].ItemPrice.Amount}}{{else}}0{{/if}}

    For item rate:

    {{#if $.OrderItem[*].ItemPrice.Amount}}{{divide $.OrderItem[*].ItemPrice.Amount $.OrderItem[*].QuantityOrdered}}{{else}}0{{/if}}

  • Justin Bodin
    Great Answer
    Celigo University Level 2: Seasoned

    Andrew, did you figure it out? Currently having the same issue with MFN replacement order.

  • Gogula R Bhavana Prebuilt Docs Team Lead Community manager

    Hello Andrew, Jeffery Hill, and Justin Bodin

    Thank you for writing to us. Our team has verified the handlebar expression again, it works fine. 

    Can you confirm if you're mapping "Items : Rate" for the replacement orders. We are assuming that Amazon is not sending the node QuantityOrdered and hence getting the Undefined result.

    Please create a Zendesk ticket and provide your account details and reply back with the ticket ID here. The team would like to review your account to resolve the error.

    Please let us know if you're looking for further information.

  • Adam Ashworth

    Please update the article, as the the text for the mapping has extra spaces in it that throws out errors.

    {{#if $.OrderItem[*].ItemPrice. Amount}}{{$.OrderItem[*]. ItemPrice.Amount}} {{else}}0{{/if}}

    should be:

    {{#if $.OrderItem[*].ItemPrice.Amount}}{{$.OrderItem[*].ItemPrice.Amount}} {{else}}0{{/if}}

    The incorrect  space is between "ItemPrice." and "Amount" in this first section and "OrderItem[*]." and "ItemPrice.Amount" in the second section.

    I was having the issue with MFN replacement orders, and this cleared the errors.

  • Justin Bodin
    Great Answer
    Celigo University Level 2: Seasoned

    Hey Adam Ashworth good catch! This actually fixed the error for me as well!


Please sign in to leave a comment.