Missing tracking info on confirmation email

Highlighted
Shopify Partner
7 0 0

Hi,

 

Ive created a private app which talks to a third party service who deals with fulfillments.

When I receive confirmation that item has been shipped, Im using API to create fulfilment.

```

$fulfilmentData = [
'fulfillment' => [
"location_id" => $this->locationId,
"notify_customer" => true,
"tracking_numbers" => $item->getTrackTraceNo(),
"tracking_urls" => $item->getTrackTraceUrl(),
"tracking_company" => 'Royal Mail',
"status" => "success",
"line_items" => []
]
];

//var_dump($fulfilmentData);die;
foreach ($item->getLines() as $line) {
$fulfilmentData['fulfillment']['line_items'][] = ['id' => $line->getChannelProductNo()];
}

try {
if (count($fulfilmentData['fulfillment']['line_items']) > 0) {
return $this->getShopify()->Order($item->getChannelOrderNo())->Fulfillment->post($fulfilmentData);
}
} catch (ApiException $ex) {
$this->logger->error($ex->getMessage());
}

When I look into the request it all looks correct, but when I receive a confirmation email, the tracking info is missing.

Do I need to enable something within the shopify? Am I missing something?

 

Regards

Bartosz

 

 

0 Likes
Highlighted
Shopify Expert
229 28 36

Hey there, is the tracking information stored in the Shopify Admin? If so, do you see it there? Maybe it is just missing the part where you include the tracking information on the notification itself, so you would need to check on the notification templates.

If you want we could give you a hand, just write us at info@webmefy.com

We help you achieve your Goals! Visit us on: Webmefy.com
0 Likes
Highlighted
Shopify Partner
7 0 0
hi,

the tracking info is not saved into shopify.
when I go to the admin, I can add a tracking info.
I've checked the templates, and there is a code to display the tracking info.

It's just when I use API to add it, it does not work.

0 Likes
Highlighted
Shopify Expert
229 28 36

you will need to add the shipping information into the admin by using the api:

 

https://help.shopify.com/en/api/reference/shipping-and-fulfillment/fulfillment#update_tracking-2020-...

We help you achieve your Goals! Visit us on: Webmefy.com
0 Likes
Highlighted
Shopify Partner
7 0 0
but its what Im doing, right?
when I create a fulfilment.

Have you looked at my code within a post?
0 Likes