Contacts in erxes have three different stages:
- Visitor - no primary contact details
- Lead - primary contact detail is provided by the contact, but may or may not have made a purchase
- Customer - primary contact detail is provided by the contact, made a definite purchase
You can convert a contact from Lead to Customer and vice versa by manually changing the state by going to their profile and clicking on Actions:
But with Automation, now you can automate this task by setting your custom criterias as triggers. To learn more about the basics of the Automation, please refer to this guide.
Before you create an Automation, identify the action that your leads take to become a customer. If your business process uses a Form to confirm a purchase, you will set Form Submission as the trigger. Or you can set your criteria if a Lead has any Deal Cards with a "Won" status. For this guide, we will look into the latter case.
Step 1: Create a trigger
- Create your trigger by choosing Sales Pipeline based trigger
- Select the Board and Pipeline
- Select Status from property type and choose 'Active' and click Apply Filter
- Add another property by selecting Stage and choosing 'Won'
- Add another property group by selecting 'Contact' type
- Select Status from property type and choose 'Lead' and click Apply Filter
- Click 'Save' (required)

Step 2: Enable enrollment
Double click on the trigger box to open the trigger menu
- Open the 'Re-enrollment' tab
- Click on the toggle button
- Selecting the Stage checkbox

Step 3: Create an action
- Click on 'Add an action' and choose 'Manage Properties'
- Select 'Contact' from the Property Type
- Select 'State' as the field
- Select 'Set' as the operator
- Choose 'Customer' from the Options for the value
- Click 'Save'
While you're at it, you can also add Score to the contact by adding another rule.

Step 4: Enable the automation
- Make the connection between the trigger and the action
- Toggle the automation status button
- Click Save