Use this action to insert, update, delete or retrieve one or more Firebase cloud documents from your Firebase account.
The action uses the following settings:
Firebase Account JSON
The JSON account token that you can retrieve from your Firebase account.
The type of action you want to execute on the database.
The project id of your database.
The name of your database. If you have only one database, you can leave (default) as name.
The name of the database collection you want to target with your command.
The Id of the document you want to target with your action.
The full JSON payload of your document.
Structured Query Filter
The full structured query payload
JSON Token Path
The JSON path of the data you want to extract for the Firebase reply.
The name of the variable that will hold the result of the action executed.
When requesting or uploading a full Firebase document, Xenioo will automatically translate each model into a simpler representation that will both speed up parsing and simplify representation.
As an example, let's have a look at the following Firebase Firebase document:
As you can see it's very complete, but also quite verbose and not very handy for quick variables reading. When accessing this document, Xenioo will automatically shrink the structure to a more concise version:
Note two things: first, the document id has been reduced to represent only the actual document final unique value. Second, the age field has been automatically translated in the projected model to the correct type, representing a number.
The same translation happens also in reverse. When using the second model to update a Firebase document, Xenioo will transform back the model to the Firebase format. Note that this is not mandatory: the Firebase Action supports both the default, Firebase native format and the Xenioo translated one.
When using QUERY mode, a full structured query can be specified inside the Query Payload parameter. As an example, searching for a document where the field "FirstName" is equal to "Mary" would require a query like this:
This action does not trigger any event.
Beside the value set to the selected Target Variable setting, this action is producing the following variables:
Set to true if the last command returned an empty list or false if any record was found
Contains the last document id returned by an UPDATE or CREATE database command
Channel specific availability follows the table below:
This action can be used only inside interactions and not as child of other actions. This action requires a Premium Account to be used on a live chatbot.