Automatizaciones - Formulario registro miembros

Hola,
Estoy creando una automatización en mi sitio web con Wix y me gustaría que me ayudéis a configurarla correctamente.

Tengo un formulario de registro en el que el usuario debe indicar si es cliente particular o profesional (mediante un campo de selección).
Me gustaría automatizar el siguiente flujo:


CUANDO un nuevo usuario se registra:

:small_blue_diamond: SI selecciona “cliente particular”
→ Que se le asigne automáticamente el rol de CLIENTE
→ Que reciba un email de bienvenida personalizado

:small_blue_diamond: SI selecciona “profesional”
→ Que reciba un email de bienvenida diferente (avisando que su acceso será aprobado manualmente)
→ Que se le asigne el rol de PROFESIONAL


¿Podéis explicarme paso a paso cómo configurar esta automatización, incluyendo la condición y la asignación de roles según la respuesta del formulario?

Gracias por vuestra ayuda.

I don’t know if you have a third instance but if you do, you don’t have to create a third else path like I have in the screenshot.

When creating the automation, you can create a condition to check what a field is and if it matches, it goes one path and if not, it follows the else path.

Their isn’t an action for assigning a role but you can use code as mentioned in the member documentation to assign a specific role.

import { Permissions, webMethod } from “wix-web-module”;
import { authorization } from “wix-members-backend”;

export const myAssignRoleFunction = webMethod(Permissions.Anyone, () => {
 const roleId = “b62310c1-1c81-4ca9-9fe9-42b48f6e164e”; //add your relevant roleID here
 const memberId = “72751428-2743-4bda-acf5-4218a4279cd3”; //you need to get the memberID of the relevant user
 const options = {
suppressAuth: false,
};

return authorization
 .assignRole(roleId, memberId, options)
 .then(() => {
   console.log(“Role assigned to member”);
  })
  .catch((error) => {
   console.error(error);
  });
});

When you create the member roles, you can see the ID you’ll use for the roleID.

I hope this helps as a start.