Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Unable to update country for recipient through Workflow

Avatar

Level 2

Hello,

We have a situation where we need to update the country for a recipient dynamically in the workflow through the update data activity,

Though we map the country field to the value we need, it's not updating.

Scenario:

Each of the recipient may have different country.

can someone please help us on this.

1720417_pastedImage_1.png

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

The field country is a linked object (nms:country) to the recipient.

Link condition is the  location/@countryCode  which is supposed to contain the ISO2 country code defined in the country table.

i.e. you need to set the country code within the Update Data activity.

View solution in original post

14 Replies

Avatar

Correct answer by
Employee Advisor

The field country is a linked object (nms:country) to the recipient.

Link condition is the  location/@countryCode  which is supposed to contain the ISO2 country code defined in the country table.

i.e. you need to set the country code within the Update Data activity.

Avatar

Employee

There are two attributes iso2 and iso3 for countrycode .How will these two type of codes will be updated in a single countrycode attribute.

Avatar

Employee Advisor

Hi @SmritiFotedar 

As mentioned in the post, the field in Recipient to update is the location/@countryCode whihc is the ISO2 code...

Thanks

Denis

Avatar

Employee

Thank you for the clarification. Can we do it by enrichment. If yes, Can you guide me through.

Avatar

Employee Advisor

Hi @SmritiFotedar 

I am a bit confused by your workflow:

You do a query on nms:recipient to get get a list of recipient --> fair enough.

How do you get the country code you want to update these recipients, do you bring it in Additional Data?

The field to update is simply @countryCode in the destination of the Update activity. 

Thanks

Denis

Avatar

Employee

We do not have country code in the csv data file, but having country column .We want to populate country code from country column in existing attribute , please let me know how can we do the same

Avatar

Employee Advisor

Hi @SmritiFotedar 

What is the format of the country in the file? Is it ISO2 value or is it just the country name itself? 

  1. If it is ISO, then you can used the standard field "@countryCoide"
  2. If it is the country name, you would need to extend the schema nms:recipient to add the country name as a new field

Thanks

Denis

Avatar

Employee

Firstly, the format of country in csv file is country name itself. I want to map the isoA2 and isoA3 values from the country column itself.
P.S I have extended the recipient schema and created a country attribute. I want to do it by enrichement.

Avatar

Employee Advisor

Hi @SmritiFotedar 

If you have the field in your CSV and the new field available in the Recipient entity, in the Update activity, you just select the field from the CSV in the Source section and you select the new field from the Recipient entity in the Target section...

Sorry I might miss something but I don't see where your issue is really

Thanks

Denis

Avatar

Employee

I tried mapping country (csv file)with the country Code(@location/countryCode). It is working fine, but when i tried to map country with isoA2(country.@isoA2) , its throwing errors.

Avatar

Employee Advisor

Hi @SmritiFotedar 

O i see, you can't map it to the field within the link if the link doesn't exist yet, so you can't map the field directly on country.@isoA2 because the link"country" does not exist yet.... Check the link definition on nms:recipient

Denis_Bozonnet_0-1656929175768.png

That's the reason you put the ISO2 from your file into the field "location/@countryCode" because it does build the link field...

Hope this clarifies,

Thanks

Denis