Here is my custom function...Im trying to add a merge field to the invoke url when adding or updating a member however am struggling with making the structure work in this case (Highlighted in yellow) has anyone done anything like this before or could share any similar code please?
//
status = "subscribed";
fname= "test";
payload = Map();
chimpmap = Map();
chimpmap.put("subscriber_hash",email);
chimpmap.put("email_address",email);
chimpmap.put("status_if_new",status);
chimpmap.put("status",status);
chimpmap.put("merge_fields","FNAME",fname));
info chimpmap;
//
NewChimp = invokeurl
[
type :POST
parameters:chimpmap
headers:{"Content-Type":"application/json"}
connection : "mailchimp"
];
info NewChimp;