dynamic segments jcustomer jexperience marketing factory unomi Jahia 8 Jahia 7.3

JExperience (Marketing Factory) doesn't update dynamic segments after profile import

Question

I am importing profiles using Profiles Import feature in jExperience. Once I finish the import I check the Dynamic Segments profiling tool and the segments are not updated with the new profiles.

If I open each one of the segments for edition and hit the Save button the segment is updated with the new profiles.

I have profile imports regularly and many segments configured so performing this operation manually is not an option. What should I do?

Answer

One possible workaround for this scenario is to use Unomi Rest service segments/resetQueries/ to force the reload of the queries that populates the number of profiles for each segment.

In a Unix OS and Unomi default installation this can be achieved with the following command:

curl -X GET -u karaf:karaf http://localhost:8181/cxs/segments/resetQueries?size=-1

If you have recurrent profiles imports in your application you might consider adding this curl command to a cron job in your OS.