Backup rates breaking carrier rates provided by apps

Solved

Backup rates breaking carrier rates provided by apps

keiraarts
Shopify Partner
55 8 11

I have a custom carrier service registered with Shopify.

{
"id": 61604266184,
"name": "viaGlamour",
"active": true,
"service_discovery": true,
"carrier_service_type": "api",
"admin_graphql_api_id": "gid:\/\/shopify\/DeliveryCarrierService\/61604266184",
"format": "json",
"callback_url": "https:\/\/viaglamour.com\/api\/v1\/webhooks\/carrier\/rates"
},

 


When I view the carrier rates available in my shipping settings (and same with customers) I'm receiving a list of zero rates available for this carrier service.

 

31c9935437df54af85a2f4297e695328.png

But if I open the network inspector and view the queries Shopify has been making on the backend to view the available rates for this location, I can see the list of the shipping rates returned by the app. Shopify fetches the rates, shows them to me in the network panel, but it won't render into a list with checkboxes.

1
: 
{carrierService: {name: "viaGlamour", id: "gid://shopify/DeliveryCarrierService/61604266184",…},…}
carrierService
: 
{name: "viaGlamour", id: "gid://shopify/DeliveryCarrierService/61604266184",…}
availableServicesForCountries
: 
[{name: "Canada Post Collect (Pickup Required)", __typename: "DeliveryAvailableService"},…]
0
: 
{name: "Canada Post Collect (Pickup Required)", __typename: "DeliveryAvailableService"}
1
: 
{name: "Canada Post Select", __typename: "DeliveryAvailableService"}
2
: 
{name: "Canada Tracked", __typename: "DeliveryAvailableService"}
formattedName
: 
"viaGlamour (Rates provided by app)"
icon
: 
{id: null, altText: "Calculated shipping app logo",…}
id
: 
"gid://shopify/DeliveryCarrierService/61604266184"
isApp
: 
true
isRegistered
: 
false
name
: 
"viaGlamour"
__typename
: 
"DeliveryCarrierService"
locations
: 
[{id: "gid://shopify/Location/66038268104", __typename: "Location"},…]
__typename
: 
"DeliveryCarrierServiceAndLocations"

Could someone look into why these carrier rates aren't being rendered on the front-end?

Head of space operations on the Shopify moon-base.
Building orderediting.com, viaGlamour.com, magicsoaps.ca
Accepted Solution (1)
keiraarts
Shopify Partner
55 8 11

This is an accepted solution.

In your app's distribution settings, you'll see a section where Shopify is measuring the response time for your shipping rates. This is like brand new, maybe a couple days ago I noticed it. You have to be returning these rates in < 2 seconds to avoid backup rates from showing from my experience.

Head of space operations on the Shopify moon-base.
Building orderediting.com, viaGlamour.com, magicsoaps.ca

View solution in original post

Replies 5 (5)

Liquidator3358
Explorer
44 1 17

I am having this EXACT problem and I am beyond frustrated.  Please tell me you found a fix?

keiraarts
Shopify Partner
55 8 11

Shopify doesn't tell you this in the documentation.

Every app can only have one carrier service and a collision of names between different apps will cause this error. Try deleting all the carrier services you have (including the test environments) and then manually create a carrier service again.

Head of space operations on the Shopify moon-base.
Building orderediting.com, viaGlamour.com, magicsoaps.ca
Liquidator3358
Explorer
44 1 17

Does this include the default DHL/UPS/USPS that are in there? Also, my problem isn't getting the rates to work 90% of the time... my problem is the random 10% of the time when it doesn't take my rates and in defaults me to Shopify's rate.  I have ZERO idea why it is happening but it is currently keeping me from launching.

keiraarts
Shopify Partner
55 8 11

This is an accepted solution.

In your app's distribution settings, you'll see a section where Shopify is measuring the response time for your shipping rates. This is like brand new, maybe a couple days ago I noticed it. You have to be returning these rates in < 2 seconds to avoid backup rates from showing from my experience.

Head of space operations on the Shopify moon-base.
Building orderediting.com, viaGlamour.com, magicsoaps.ca
Liquidator3358
Explorer
44 1 17

Interesting... that would explain the inconsistency.  My rates are cached before I even get to checkout, so speed SHOULDN'T be an issue (pulling from redis).  That time constraint would explain the absolute randomness that has been happening... If I refactor and fix it because of your little tidbit of information, I feel like I owe you money haha