Solved

Magneto API- I need help with adding tracking number using " sales_order_shipment.addTrack "

Posted on 2013-06-14
2
681 Views
Last Modified: 2013-10-31
I'm seeking help updating Magneto using Vbscript /XML and their API.  I'm able to successfully query and import order address information.  However,  I receive an error on export when I attempt to update the tracking number using the api call sales_order_shipment.addTrack -  I receive error 100 "Requested shipment not exists."  

I am able to created a new sales order with the api prior to the tracking call.
SalesOrderShipmentAddTrackReques.xml
0
Comment
Question by:col1dxw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 39250107
Hi cl1dwx,

in your example, you write:
"This XML file does not appear to have any style information associated with it. The document tree is shown below."

That is becuse it's not realy a "normal"xml file, it's probably part of the wsdl.
If you import the wsdl, you get 2 objects, one with the data objects and one with the "actions"
So to do your "sales_order_shipment.addTrack" you probably need two other objects:

They are named something like:
sales_order_shipment_addTrack_object
sales_order_shipment_addTrack_responseobject

I will check later-on and let you know
0
 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 500 total points
ID: 39250372
Hi again,

I checked, and the answer is that you first need the wsdl.
after that you can create the right objects, I don't know how todo in vb, but my language it is :


Var=Action dataType=MagentoOperations()
Var=MagentoParm  dataType=salesOrderShipmentAddTrackRequestParam
Var=Response dataType=salesOrderShipmentAddTrackResponseParam

Set MagentoParm.sessionID=mySession
Set MagentoParm.carrier=myCarrier
Set MagentoParm.shipmentIncrementId=Id+1
Set MagentoParm.title=myTitle
Set MagentoParm.trackNumber=myTrackSeq

Set Response=Action.salesOrderShipmentAddTrack(MagentoParm)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question