Apiguide

Testing Cloud Trigger

Testing the cloud trigger endpoint without a physical device

There may exist situations where you want to test the compatibility of the Cloud Trigger endpoint without having access to a physical device. enVision Cloud supports a "simulation mode" where all requests to this endpoint will immediately return a well-formed response with randomized weight and measurement values without attempting to route the request to a physical device.

This can be useful for testing the API integration against your software platform without worrying about the device side of things.

Enabling Simulation Mode

In order to make changes to the Simulation mode setting, your enVision Cloud user account must be provisioned with appropriate permissions. You may need to contact your Administrator for more details.

To enable simulation mode, first log into the enVision Cloud Portal. Once you are logged in:

  1. Navigate to the Settings section from the left-side navigation bar
  2. Under "Integration Settings", Enable the "Simulate Remote Trigger Transaction Responses" switch

Simulate Remote Transactions

Note that enabling this setting will change behaviour for ALL requests to this endpoint for your Company. Be sure to toggle it off to resume normal behaviour.

Limitations with Simulation Mode

When simulation mode is enabled, all requests to the endpoint will return with an HTTP Status code of 200 - OK, and the response body will always contain a message with an Error Code value of 0, indicating success.

When implementing an integration, be sure to handle for cases where the HTTP Status code is not 200 - OK as well as cases where the Error Code property of the response body is not 0, indicating a problem when measuring.


Copyright © PHD Solutions 2024