Document how to create messages in ECA

Created on 2 July 2024, 6 months ago
Updated 30 August 2024, 4 months ago

It's not entirely clear how to create messages using ECA, some documentation would be helpful.

πŸ’¬ Support request
Status

Fixed

Version

1.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @DamienMcKenna
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Here's what I'm doing so far.

    * I have a message configured with a field_user that's a reference to a user.
    * The message uses [message:field_user] etc to loads details about the user on the message.
    * Added an ECA model with the event set to user login.
    * The model then has an action of "entity: create new", the entity type is the "message: user logs out" item noted above, and owner ID is set to "[current-user:uid]".

    This doesn't seem to work.

    Questions:
    * What should the "Name of token" be set to?
    * How do I pass other data to the message, e.g. for field_user? I had been assigning them in custom code, but I'd prefer to manage this logic in ECA rather than custom code, for visibility sake.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    The missing step was to add a new action that saves the entity, either the "Entity: set field" action and then set the "Save entity" option to "Yes", or add the "Entity: save" action.

    Thanks to jurgenhaas for the help working this out.

  • Status changed to Fixed 4 months ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen
  • πŸ‡©πŸ‡ͺGermany Hydra

    Sorry for not answering this and thx JΓΌrgen vor stepping in. I referenced this issue on the modules page.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024