Walmart Commerce SDK Getting Started Guide

Getting Started

  1. Discover the product

In Unity Dashboard, the Walmart Immersive Commerce product can be found under the Grow category.

The Commerce opportunities will only be available to players in the United States for now.

  1. Roles Overview

In order to perform the setup steps below, you need to be the Owner of the organization or have Immersive Commerce Service Manager role assigned to your user.

  1. Enable service

  1. Accept ToU and Sign API Agreement

In the Setup page, Walmart Commerce Terms need to be accepted in order to use this product.

ToU

  1. Upload public key and retrieve Walmart client secret

Client credentials are needed to make purchases on Walmart, and they can be obtained from the Setup page, once the agreements have been accepted. A private / public key is required to safely retrieve the client’s secret. Details on how to generate and use them, can be found in the Unity Dashboard Setup Guide page (step 1).

  1. Create a product package

You can define a product package to include a list of products you plan to sell in your game. In Unity Editor, you will define a commerce opportunity that will display at runtime, one of these products randomly. If you want to guarantee that a particular product is selected, simply make a singular item product package.

  1. Setup Walmart Relay Server

In order to place orders on Walmart ecommerce, you need to have a backend service that will make API calls to Walmart Services. Unity provides a reference implementation that can be used. The steps below describe how to deploy this reference implementation in Unity Cloud Code. More details can be found in the Setup Guide page (step 5).

a. Create Unity service account

A service account is needed to allow UGS CLI tools to perform deployments on Cloud Code. The following roles should be configured for the service account.

b.Install UGS CLI

Follow these instructions to install UGS CLI.

c. Clone Walmart Relay Server repository

Clone the relay server repository. You will need .NET SDK 8.0 or higher to build and publish this service.

d. Deploy Relay Server in Production environment

Using the key-id and secret-key obtained when setting up the Unity service account, run the following commands from the root folder of the cloned repo:

ugs login
ugs config set project-id <project id>
ugs config set environment-name production

Create a configuration.rc file in the root of the OrcaAuthRelay folder.

{

"$schema": "https://ugs-config-schemas.unity3d.com/v1/remote-config.schema.json", "entries": {

"WALMART_IAM_CLIENT_ID": "<client ID>",

"WALMART_IAM_HOSTNAME": "[developer.api.walmart.com](http://developer.api.walmart.com)",

"WALMART_ICS_HOSTNAME": "[developer.api.us.walmart.com](http://developer.api.us.walmart.com)",

"WALMART_ICS_KEY_VERSION" : "2",

"WALMART_ICS_TITLE_ID": "<client ID>"

},

"types": { }

}

Deploy service and configuration.

ugs deploy .

Validate that deployment was successful in Cloud Code and RemoteConfig.

e. Deploy Relay Server in Sandbox environment

Follow similar steps to do a deployment for a sandbox environment. Details of this, can be found in the Setup Guide page (step 5).

f. Add project secrets

Set the following project secrets in the Unity dashboard.

  1. Configuring Cat Game Sample

Clone CatGame repo

Clone the CatGame repository and open the project in Unity Editor.

Link the game to the cloud project

In Unity Editor, link the Unity project to the cloud project. More details can be found in Setup Guide page (step2).

Datastore configuration

Set the Organization Id in Assets/Resources/Commerce Opportunity Editor/CommerceOpportunityDatastore.asset.

Sync product packages from Unity Dashboard

This step will link the existing commerce opportunity from the sample game to the product package created previously. When the commerce opportunity will be displayed at runtime, it will show a random product from the product package.

Set Url to Walmart Relay Server

Set BaseUrl setting to “https://cloud-code.services.api.unity.com/v1/projects/” in Assets/Resources/Unity Immersive Commerce/ARS Configuration. This will allow the game to communicate with the Walmart Relay server to purchase Walmart products.

Set deep link for Android

This step is required to allow players to link their Walmart accounts to your in-game accounts. From the game, players will be redirected to the Walmart website to enter their credentials for their Walmart account. Once this is done, they will be redirected back to the game via the deep link. Details about this step can be found in the Setup Guide (step 12).

Update the AndroidManifest.xml based on the deeplink url, which can be found in the Unity Dashboard, Setting page.

setting

Build & Run on Android

The Walmart Immersive Commerce experience is currently available only in the United States. You can use a US VPN Gateway, if testing from another country.

Useful links

Walmart Relay Server Github Repository

CatGame Github Repository

Asset store

2 Likes

I genuinely do not understand what this Walmart SDK is. Could you please explain what the purpose is, and why Unity developers might wish to use it? What problem is it solving?

Thanks!

The purpose of the SDK is to enable the sale of physical goods in a game. It is an optional add-on service with multiple use cases. You can enable it to sell your own merchandise in a game store, for example allow the player to purchase a plushie of their favorite character or a t-shirt through the 3rd party Walmart marketplace. You can allow brand activations in a relevant situation- in a design game, purchase the pillow you chose for the room in real life. If done right this should result in fewer ads and less disruption to the game play. We’ve seen that players feel deep loyalties to the games they play and want to interact on a physical level as well. It may not make sense for all games or developers, but its a feature that has been asked for. Its also a great Monetization opportunity for developers. Rather than a disruptive ad break, you could enable a purchase that rewards your player, or gives them an opportunity to buy something they want that is relevant to your game while you earn an affiliate fee. This SDK could also be used for teams interested in creating retail-specific immersive experiences- for example buy the real life version of your avatar’s outfit.

2 Likes

Thank you for the helpful reply. Is it correct to say that the developer fulfills distribution and delivery of ordered items?

Walmart handles all of the distribution and delivery of their goods. For your own merchandise here is a link to how their 3rd party Marketplace works.

1% to 4% affiliate commisions doesn’t sound exactly tempting to embed walmart in my application. Those figures were also buried, and took more than it should to find it.

A lot of us moved into games to stop slaving to making billionares richer in trade for a creative pursuit and labor of love. It seems like a whole lot of effort to make a virtual catalog where you reap 1-4% roi for the work done, and tie yourself to walmart/unity commerce.

That said, i do like the direction. I think it needs to be more competitive and more appealing ROI for entire studios to shift their efforts to more dependency with (subjectively) higher risk.

I would love to make a cool marketplace and get commissions on making the shopping experience better. The amount of unpaid work to get to a point where it sees pennies a day doesn’t feel practical.

The rates you quoted are Walmart’s public affiliate rates and not not necessarily reflect the rates the Unity is offering. Rates will be visible within the developer dashboard after onboarding and may vary by category and program.
The Unity program has its own structure compared to Walmart’s standard public affiliate offering, and we’re actively working on additional incentives for early adopters and brand-led campaigns. Our Beta tests were pretty compelling. If you want to discuss in more detail I’m happy to chat.