UltraCart / rest_api_v2_sdk_php

UltraCart REST API PHP Client
Apache License 2.0
3 stars 4 forks source link

When to use Fulfillment API? #13

Closed chadhakavita closed 6 years ago

chadhakavita commented 6 years ago

Hi, Could you please tell me at what stage I need to use Fulfillment API? And could you please explain to me what does below line code means?

$fulfillment_shipment->setTrackingNumbers(['TrackingNo12345', 'TrackingNo67890']);

Tracking Number should be unique and how I'll pass the tracking number in above line code?

And Last, I want Web service(SOAP) as a TRANSMISSION MECHANISM for DISTRIBUTION CENTERS.

perrytew commented 6 years ago

The fulfillment API is used by shipping companies when they physically package and ship product out the door. At that time, they generate a tracking number via United States Postal, UPS, or FedEx. The fulfillment API is used by the shipping companies to 1) know when there is a placed order that needs shipping 2) then notify UltraCart that the order was indeed shipped and should be moved from the Shipping Department to 'Completed Orders'. 3) finally provide tracking numbers so UltraCart can sent shipment notifications to customers that contain tracking numbers.

In our previous conversations, you seemed mostly focused on a checkout. The fulfillment API doesn't have anything to do with a checkout or taking an order. However, if you're also creating code to handle shipping of product, then you will find it necessary.

Regards

chadhakavita commented 6 years ago

Hi Perry, I've gone through the fulfillment API but I need to know why you are using the static tracking number on the following line: $fulfillment_shipment->setTrackingNumbers(['TrackingNo12345', 'TrackingNo67890']);

perrytew commented 6 years ago

I hope you're only seeing this within an example, and not embedded in the SDK itself. Those numbers are just examples. In a real setting, they would come from FedEx or UPS. However, retrieving those values would make any examples very verbose and distracting from the UltraCart API, so we just chose two fake values and use them to reinforce that the method setTrackingNumbers takes an array and not just a single value.

chadhakavita commented 6 years ago

Do I need to add fulfillment API in my website anywhere? I get confused with your following message: The fulfillment API is used by shipping companies when they physically package and ship product out the door. At that time, they generate a tracking number via United States Postal, UPS, or FedEx. The fulfillment API is used by the shipping companies to

know when there is a placed order that needs shipping then notify UltraCart that the order was indeed shipped and should be moved from the Shipping Department to 'Completed Orders'. finally provide tracking numbers so UltraCart can sent shipment notifications to customers that contain tracking numbers. In our previous conversations, you seemed mostly focused on a checkout. The fulfillment API doesn't have anything to do with a checkout or taking an order. However, if you're also creating code to handle shipping of product, then you will find it necessary.

perrytew commented 6 years ago

That depends. Is your web site a checkout? Is it taking orders? Then no, you do not need it.

Is your website communicating with a fulfillment center? Then yes, you probably need it. I doubt you need it.

chadhakavita commented 6 years ago

Yeah, I need this API. One more thing, Could you please guide me what are things I need to make changes in your sample code and what time I should add this API directly after checkout API: https://www.ultracart.com/api/#resource_fulfillment.html

Making you crazy :)

perrytew commented 6 years ago

Well, that depends on what you want to do with the fulfillment api. The sample is a full lifecycle of communication with ultracart. You'll need to add communication with your local database or fulfillment center. I have no idea what your setup or configuration is, so I can't give advise to that.

chadhakavita commented 6 years ago

Perry, My requirement is when the customer checkout then the order will be received to the CRM and sent to the fulfillment center. And I want to use web service(SOAP) from the as a transmission mechanism.

perrytew commented 6 years ago

Which fulfillment center? Does UltraCart already have an integration with them? If so UltraCart can transmit to the fulfillment center automatically.

chadhakavita commented 6 years ago

Hi Perry, For integration with fulfillment services I came to know that we just need to set following details in CRM: • Merchant ID • Distribution Center Code • API Code

And have to pass the above details to the fulfillment center to complete the connection. I apologize for the confusion and seriously you guys are awesome :+1: