Skip to content
+1-888-319-3663

COMMUNITY FORUM

Correct Syntax for Mapping Field to XML Rest Destination

Aliaksei asked 3 months ago

Hello,

 

I’m trying to post to Volusion API updated tracking numbers for our orders. 

I was able to setup the REST Destination and tested the default Method Body:

<?xml version=”1.0″ encoding=”utf-8″ ?>
<xmldata>
<TrackingNumbers>
<gateway>UPS</gateway>
<MarkOrderShipped>false</MarkOrderShipped>
<OrderID>1234</OrderID>
<SendShippedEmail>false</SendShippedEmail>
<Shipment_Cost>0</Shipment_Cost>
<ShippingMethodID>141</ShippingMethodID>
<TrackingNumber>12345</TrackingNumber>
</TrackingNumbers>
</xmldata>

 

I have confirmed that the REST Method and Method Body function as when I ran a map that uses this method and the xml method body has manually typed values (IE: Order ID = 1234 as above) the information posts correctly on the Volusion site.

The problem is I can’t figure out how to pass Mapped Variables to the Method Body.

For example, I want the Method Body to pull in the mapped Order ID when posting the request. When I run the map while passing a value, a value does not get passed. I have also set a local constant for OrderID in my map to confirm this is not a source data issue.

<?xml version=”1.0″ encoding=”utf-8″ ?>
<xmldata>
<TrackingNumbers>
<gateway>UPS</gateway>
<MarkOrderShipped>false</MarkOrderShipped>
<OrderID>{“OrderID”:”{OrderID}”}</OrderID>
<SendShippedEmail>false</SendShippedEmail>
<Shipment_Cost>0</Shipment_Cost>
<ShippingMethodID>141</ShippingMethodID>
<TrackingNumber>12345</TrackingNumber>
</TrackingNumbers>
</xmldata>

 

Does anyone know the correct way to pass a map value to a method body or if what I’m asking is even possible? Thank you!


If you would like to submit an answer or comment, please sign in to the eOne portal.