Skip to content

Firestore Document API Reference

This section documents the Blueprint helper functions used to construct, modify, and inspect FFirestoreDocument instances in Blueprints. These functions provide the only supported way to work with Firestore documents in Blueprint graphs.

The underlying FFirestoreDocument structure is shared between C++ and Blueprints, but its native setters and getters are intended for C++ usage only. Blueprint users must always use the functions provided by this Blueprint library.

All functions in this section operate purely on local document data and do not perform any network or Firestore operations.


Setters

Node Parameters Callbacks / Return Description
Set Int Doc (FFirestoreDocument, ref), Key (string), Value (int32) Sets an integer field in the Firestore document.
Set Bool Doc (FFirestoreDocument, ref), Key (string), Value (bool) Sets a boolean field in the Firestore document.
Set Double Doc (FFirestoreDocument, ref), Key (string), Value (double) Sets a double-precision numeric field in the Firestore document.
Set String Doc (FFirestoreDocument, ref), Key (string), Value (string) Sets a string field in the Firestore document.
Set Object Doc (FFirestoreDocument, ref), Key (string), Value (map) Sets an object field composed of key-value pairs in the Firestore document.
Set Array Doc (FFirestoreDocument, ref), Key (string), Value (array) Sets an array field in the Firestore document.
Set Null Doc (FFirestoreDocument, ref), Key (string) Sets a null field in the Firestore document.

Getters

Node Parameters Callbacks / Return Description
Get Int Doc (FFirestoreDocument), Key (string) int32 Returns the integer value stored under the specified key.
Get Bool Doc (FFirestoreDocument), Key (string) bool Returns the boolean value stored under the specified key.
Get Double Doc (FFirestoreDocument), Key (string) double Returns the double value stored under the specified key.
Get String Doc (FFirestoreDocument), Key (string) string Returns the string value stored under the specified key.
Get Object Doc (FFirestoreDocument), Key (string) map<string, FFirestoreValue> Returns the object value stored under the specified key.
Get Array Doc (FFirestoreDocument), Key (string) array<FFirestoreValue> Returns the array value stored under the specified key.

Helpers

Node Parameters Callbacks / Return Description
Has Field Doc (FFirestoreDocument), Key (string) bool Returns whether the Firestore document contains a field with the specified key.
Get Field Type Doc (FFirestoreDocument), Key (string) EFirestoreValueType Returns the type of the value stored under the specified key.

Notes

  • These functions only modify or read local document data and do not communicate with Firebase directly.
  • To send or retrieve documents from Firestore, use the Firestore API nodes documented in the Firestore API Reference section.
  • For working with individual field values, see FFirestoreValue.

C++ Usage

In C++, FFirestoreDocument can be used in two different ways, depending on your workflow.

Using Native C++ API

When working purely in C++, you can directly access and modify FFirestoreDocument using its native C++ interface. This approach is often more convenient and expressive for C++ code and is recommended for C++-only workflows.

To use the native API, include the document header:

#include "FirestoreDocument.h"

The example below shows a typical native C++ workflow for creating and reading a Firestore document:

FFirestoreDocument Document;

Document.SetInt(TEXT("level"), 5);
Document.SetString(TEXT("name"), TEXT("player123"));

int32 Level = Document.GetInt(TEXT("level"));
FString Name = Document.GetString(TEXT("name"));

Using Blueprint Helper Functions in C++

The same helper functions exposed to Blueprints can also be used from C++ by including the Blueprint helper library:

#include "FirestoreDocumentLibrary.h"

The following example demonstrates the same document construction and access pattern using the Blueprint helper functions from C++:

FFirestoreDocument Document;

UFirestoreDocumentLibrary::SetInt(Document, TEXT("level"), 5);
UFirestoreDocumentLibrary::SetString(Document, TEXT("name"), TEXT("player123"));

int32 Level = UFirestoreDocumentLibrary::GetInt(Document, TEXT("level"));
FString Name = UFirestoreDocumentLibrary::GetString(Document, TEXT("name"));

This approach is useful when:

  • sharing logic between Blueprint and C++
  • keeping behavior consistent across both systems

Summary

  • Blueprint users must always use the Blueprint helper functions
  • C++ users may choose either approach native FFirestoreDocument API or Blueprint helper functions via FirestoreDocumentLibrary

Both approaches are fully supported and interoperable.