HelperStable

Add company to group

Adds a company to a group without modifying other memberships.

Company / contact
Add company to group
Companies & contacts
Typed result

Vue d’ensemble

Adds a company to a group without modifying other memberships.

Exemple

After approval, add the customer to the group of companies eligible for an offer.

Parameters 2

companyRequisCompany
Platform company on which the operation must act.
company_group_idRequisref(company_group)
Target group selected in the picker or supplied as a typed reference.

Outputs 2

changedboolean
Whether this execution actually created the membership.
is_memberboolean
true: membership is established at the end of the operation.

Behavior

The company and group must belong to the same merchant. An existing membership succeeds with changed=false. An actual creation returns changed=true and emits company.assigned_to_group. is_member is true at the end of the operation.

Limits and responsibilities

  • The node creates neither company nor group and does not replace the membership list.
  • Repeating the same addition creates no duplicate. A later mutation may change membership.