Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 5 Next »

In this article, we create an API operation for one of our builds in Application (DemoApp). It will update one of the objects' fields.

Creating

Go to API Operations (GREEN MARK) section on the Top Menu of Mobsted platform



Click Add Operation (RED MARK)


Click Mobstedv8 (RED MARK) to see the list of available API methods.
Choose 1.6 Updating Object data (GREEN MARK)
Name your new operation (ORANGE MARK)


Fill in applicationId - #Application:id# (RED MARK)
Choose Key in API Key drop-down (GREEN MARK)


Click Add Field = Value pair and fill in the fields (RED MARK), click Save


Fill in the new field Address (one of the object's columns in DemoApp)
Click Save Operation (RED MARK)


Close Operations window


The operation is ready to use in the trigger or in the mobile app as Action.


Let's configure filter and trigger to add automatic action to our app.

Click Menu (RED MARK) and select Objects (GREEN MARK)

Click Add filter (GREEN MARK)

Click Create New Filter (RED MARK)


Configure your new filter.
Choose ActionName in events section (RED MARK) and equals + Water Delivery Order in value section(RED MARK)


Click Save Changes (RED MARK) and go to the Triggers tab (GREEN MARK)


Click Create new trigger

Configure your new trigger
- Name your trigger (RED MARK)
- choose Events in trigger scope (GREEN MARK)
- choose Automatic in trigger mode (ORANGE MARK)
- choose Instantly in On new data, appearing (BLUE MARK)
- click Start automatic mode (Red button)


Choose UpdateAddress operation in the drop-down and click Add Operation


Close filter's window


OK. We did it. It's time to check how it works.


You are in the Objects section. Open the app for any object (RED MARK).
Be sure that all cells in column Address are empty (GREEN MARK).


Open app in your desktop browser(GREEN MARK) or in your mobile - scan QR (RED MARK)


Go to Water delivery and make an order. In few seconds trigger will check the new event with ActionName = Water Delivery Order and execute the chosen API operation (UpdateAddress).

     


Go to the Objects in DemoApp and find the updated cell in your objects' column.


  • No labels