question

Greggory Addison avatar image
Greggory Addison asked

Search Items Function In Economy V2 Keeps returning "Store Not Found" Error

I'm currently calling the SearchItems api call in my c++ code an passing an alternate ID for my store name. For some reason the store is not found even though I know it exists on the back end. I've also tried to hard code the Id value with the item id of the store and still the same error. To make it even more confusing when I call search items and leave everything blank my store is returned as an item so I'm lost on how it is not being found. Here is my code

 // Start the search for items once we have cached the correct stores
             PlayFab::EconomyModels::FCatalogAlternateId AlternateId;
             AlternateId.Type = "FriendlyID";
             AlternateId.Value = "TestStore";
                
             PlayFab::EconomyModels::FStoreReference StoreReference;
             StoreReference.AlternateId = MakeShared<PlayFab::EconomyModels::FCatalogAlternateId>(AlternateId);
                
    
             PlayFab::EconomyModels::FEntityKey EntityKey;
             EntityKey.Id = "9A9B4";
             EntityKey.Type = "title";
                
             PlayFab::EconomyModels::FSearchItemsRequest ItemsRequest;
             ItemsRequest.Count = 50;
             ItemsRequest.Store = MakeShared<PlayFab::EconomyModels::FStoreReference>(StoreReference);
    
    
             EconomyAPI->SearchItems(ItemsRequest,
         PlayFab::UPlayFabEconomyAPI::FSearchItemsDelegate::CreateUObject(this, &ThisClass::OnGetTestStoreItemsSuccess),
             PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &ThisClass::OnGetTestStoreItemsFailure));

And here is a screen shot of my store published on the back end 6305-image.png

Any help on what could be possibly going wrong is much appreciated.

apissdksIn-Game Economyunreal
image.png (111.2 KiB)
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Infer Wang avatar image Infer Wang commented ·

We can't reproduce your issue in our title. And we can get the store item using the AlternateId. Could you please use the postman to test it and see whether it works?

0 Likes 0 ·

1 Answer

·
kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

The AlternateId.Type you should be using is "FriendlyId" (not "FriendlyID"). I double-checked the logic on the backend and we don't validate it in a way that would be helpful. We just return "Not Found".

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.