Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 16 Next »

What is CMS?

In a nutshell, you can customize your entire Website or App in this platform.

Sanity is the CMS (Content Management System) used to host content for RBI’s digital platforms. Sanity will structured and host your restaurant data, menu, marketing images, navigation, promotion and etc.

How to get access on Sanity?

You should request access for your Customer Success Manager.

How are the environments set up?

Your website will always be hosted in 4 development environments:

  • Development

  • Staging

  • Quality Assurance (QA)

  • Production

These are used according to the best practices of Software development, and will minimize the chances of wrong developments or wrong content configurations from being seen by your guests.

Mainly, engineers team rely on using the lower environments (Development, Staging and Quality Assurance) to develop new features. Each of the Environments also has a respective Sanity link, meaning for each Environment you will have:

  • One Front End Link: Which will work like your website URL where you can actually see the website

  • One Sanity Link: Which will access your CMS for that environment.

Noticed that making changes to Staging will affect Staging environment only.

Request for your Customer Success Manager the respective links for your market.

Which environment should I work?

Essentially, franchisees focus on Staging and Production environment.

  • Staging environment: it is the place where you will create and tested the content and the real users are not access.

  • Product environment: it is the place where the content is published for real users.

You should start produce a new content on Staging environment and once the content is ready to be published to production, you should use the process of Sanity Migrations.

What are Sanity Migrations?

Sanity Migrations allow you to independently migrate content from Staging to different environments.

According to best practices of content management, new content should be created and tested on Staging environment and afterwards published those changes to Production environment.

You will need a write token in order to use this tool. If don’t have one, request it from your Customer Success Manager. Make sure to save it locally on your computer so you can re-use it, but please DO NOT SHARE THIS TOKEN, as it is a user-specific token.

There are two ways to migrate content, through the GROQ query in the Migration tool or migrate an individual document.

Staging should always be the source of truth to migrate changes to other environments (e.g. staging → production)

How to use Migration tool?

The Migration tool can be found on the top navigation menu in Sanity.

The Migration tool allows you to migrate multiple documents using a GROQ query, as opposed to only moving the currently viewed document. In terms of functionality, the actual migration tool works the same as the document action.

Sanity-Migration tool.png

Once you input your token, you’ll be prompted to input a GROQ query that refer to the document you’d like to move:

Sanity-Migration tool-1.png

Below you can find the most used queries for your use:

  • MIGRATES WHOLE MENU BUT DOES NOT INCLUDE OFFERS: *[_id in ["feature-menu-singleton"]][0..10000]

  •  MIGRATES ALL OFFERS: *[_id in ["feature-offers-singleton"]][0..10000]

  •  MIGRATES ALL STATIC PAGES: *[_type in ["staticPage"]][0..10000]

  • PUSHES WHAT WE SHOW ON THE HOMEPAGE: *[_id in ["feature-home-page-singleton"]][0..10000]

  •  UPDATES ONLY MARKETING TILES: *[_type in ["marketingTile", "marketingTileGroup"]][0..10000] 

  • MIGRATE ALL DOCUMENTS WITH TYPE ‘ITEM’: *[_type in ["item"]][0..10000]

  • MIGRATES ALL DOCUMENTS WITH TYPE ‘OFFER’: *[_type in ["offers"]][0..10000]

  • MIGRATE ALL INFORMATION: *[]

You can also build your own GROQ queries, more information on GROQ here.

This process will also move children documents associated to the documents you’re migrating

Once you’ve inputted your query, you’ll need to select your destination dataset – typically prod_[brand]_[country].

Sanity-Migration tool-3.png

After that you can click on Migrate. When the migration is done, you should get a message indicating Migration Successfully Complete!

Sanity-Migration tool-4.png

How to migrate an individual document?

If you would like to only migrate a specific document, you can make use of the document migration feature.

To migrate an individual document, follow the instructions below:

  1. Next to the Publish button you will find a dropdown menu with the option Migrate.

  2. Upon clicking on Migrate, you will be prompted to input your token.

  3. Similarly to the migration tool process, you will need to select the destination dataset.

  4. If there is changes to migrate, click on the Migrate button and wait for the migration to finish. Do not close the pop-up until the migration is complete.

  5. When the migration is done, you should get a message indicating Migration Successfully Complete!

This process will also move children documents associated to the document you’re migrating

How to schedule publishing of documents?

You are able to create a content and publish it in specific time.

Currently, the flow is as follows:

  1. Update and Publish the content in Staging (E.g create a new combo)

  2. Based on the best practices, test the combo in Staging, then migrate the individual document to Production.

  3. Add the new combo to the section in Production and schedule the change to the section - do not publish it.

  4. When the scheduled date/time comes, the document should automatically publish.

It is important to note though, that there are certain documents whose visibility in the app is only dependent on whether the document is in Production (as opposed to only being visible when it is referenced in another document, like a combo in a section or a marketing tile on the feature home page document).

An example of this would be a static page document. The flow for these types of documents would be the same as the above, except you would click the Unpublish action on the document in Production after step 2 - then you would schedule the document to be published when you want it to be accessible.

Content can be schedule in two different ways:

  1. Via Document Action

  2. Via View Document Metadata

Via Document Action

Follow the steps below:

  1. Next to the Publish button you will find a dropdown menu with the option Schedule.

  2. Click the Schedule action and you will be prompted with a modal describing when you want the document to be published.

image (2) (1).png

View Document Metadata

Follow the steps below:

  1. If a given document has a schedule attached to it, you will see the banner at the top of the document as well as a badge along the bottom of the document indicating that the document is scheduled.

image (3) (1).png

How can I check my schedules?

You can view all planned/successful scheduled content publishes in the Schedule overview tool (located in the top panel of tools).

Screenshot 2024-08-21 at 21.37.09.png

  • No labels