Smartmate clients interact with Smartmate through actions.

By inserting a record in the actions table, you are telling Smartmate to perform such action. Results of the action will be then updated in the same record. You can subscribe to the actions table to wait for the response.

Working with actions

Due to the async nature of the Smartmate architecture, working with actions requires 2 steps:

  • Sending the information

  • Waiting for an async response

The information is sent by posting a GraphQL mutation in the actions object, and getting the action id, which is automatically generated by the system.

After you get the id you can subscribe to that specific action, waiting for the executed value change to true. Once the action is executed, you can get the following information:

  • successful: Whether the action executed successfully.

  • responseCode: HTTP Response code.

  • errors: Errors (if any)

Available Actions

The following actions are available for you to interact with Smartmate from any external system: