I want to use only the ETM to create an event for each contact user with a specific skill. I will be using CRON expression to trigger the channel. I have a datamapper to get a list of users with the skill, and works fine.
I then use the following Iteration Expression to pass this onto another datamapper.
I then try to set the affected user by doing the following below.
The second datamapper runs 4 times which is correct as there is 4 contact users being met with the criteria in first datamapper, but the second datamapper is unable to set any affected users.
Best answer by Paul McCulloch
In your second mapper you must access the values from the iteration expression - it’s available via the ‘inbound’ keyword (replacing the actual inbound data, which in your case, of a Timer import, is just a timestamp).
So, the contact user ID expression should be inbound.data.id; - as you have created an object with a field named ‘data’ in your iteration expression.
You can simplify this though. If you make your iteration expression simply mapped[0].variables.contact_user;
then your contact user ID expression would just be inbound.id;
In your second mapper you must access the values from the iteration expression - it’s available via the ‘inbound’ keyword (replacing the actual inbound data, which in your case, of a Timer import, is just a timestamp).
So, the contact user ID expression should be inbound.data.id; - as you have created an object with a field named ‘data’ in your iteration expression.
You can simplify this though. If you make your iteration expression simply mapped[0].variables.contact_user;
then your contact user ID expression would just be inbound.id;
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.