Provision in the shop
The ASSE interface is a standard part of every WEBSALE shop and can generally be used. OR ASSE must be enabled/activated in the shop (optionally per subshop).How it works
- The transmission takes place on the server side from the shop server to the recipient server (not from the client/browser)
- Communication takes place exclusively via HTTPS
- The execution is asynchronous: triggering does not block the shop process, even if the target system does not respond
- Multiple events/targets can be configured
- For each event, the transmission can be carried out via an HTTP request with a different method (e.g. GET/POST/PUT)
Event configuration
Any number of events can be configured for the ASSE interface. Each event is uniquely addressed via an event ID (this ID is used when triggering). The configuration is done via the configuration node general.asseUse in templates (brief overview)
In templates, the module $wsAsse is available. With$wsAsse.fire(<eventId>, <data>), an event is triggered and an asynchronous HTTP request is executed based on the stored event configuration.
- Return:
trueif the event was successfully triggered;falsein case of configuration problems. However,truedoes not mean that the request has already arrived successfully at the recipient (asynchronous). datais not URL-encoded (must be done manually if needed)- If a list or an object is passed, it is converted as JSON
List configured events (determine event IDs)
If the event ID is not known or you do not want to look into the configuration.Trigger event (fire)
An event can only be triggered if it was previously created in the configuration general.asse.Example
- A payload is built:
userid=<ID of the logged-in user> - The configured event
myeventis triggered - The return value
trueonly means: the event was triggered — not that the HTTP request was already successful at the target. $eventDatais not automatically URL-encoded (so special characters/spaces, for example, must be encoded yourself beforehand if needed)- Depending on the configured HTTP method,
$eventDatais transmitted as part of the URL (e.g. with GET) or as a request body (e.g. with POST/PUT/PATCH) (according to ticket text)
