问题
hi and sorry for my errors
now i have problem with fields, actually instead of having : firstname, lastname, email fields, business asking me to have 2 additionnal fields, job and country and i've updated my script with this :
$person = @{
email_address=$email
status ="subscribed"
merge_fields = @{
FNAME=$firstname
LNAME=$lastname
title=$title
Country=$country
$dayAgo = (Get-Date).AddDays(-5).Date
$users = Get-ADUser -Filter {whenCreated -ge $dayAgo} -Properties whenCreated, StartDate, country, title
# Iterates over each user in AD that is new
Foreach ($user in $users) {
$flagDown = $false
echo $user
$Fname = $user.GivenName
$Lname = $user.surname
$email = $user.UserPrincipalName
$title = $user.title
$country = $user.country
addUsertoMailChimp $email $Fname $Lname $title $country
}
and my problem now is , there is no data pulling in mailchimp, i mean i have firstname, lastname, and email but i don't have country and job
Thank you in advance
来源:https://stackoverflow.com/questions/63811596/updated-how-can-i-edit-my-script-to-import-additionnal-fields-to-mailchimp