putyourlightson / craft-campaign

Send and manage email campaigns, contacts and mailing lists in Craft CMS.
https://putyourlightson.com/plugins/campaign
Other
64 stars 24 forks source link

Request: Richer import mapping for craft elements #417

Closed robinbeatty closed 10 months ago

robinbeatty commented 1 year ago

In order to make best use of segments feature, during a csv import process it would be ideal if authors could map arrays of element handles to craft elements via the UI. I know we can import arrays of element ids, but if there was a further dropdown on contact entries/categories fields to be able to map the handles to the elements that would be a lot more friendly for authors, saving them having to find the element ids via the CP.

If this doesn't look like it would go into the roadmap, could this feature be adapted for my use case via a module? Many thanks

bencroker commented 1 year ago

I’m not quite following the use-case, can you please explain it further? And does this functionality perhaps already exist when using the Feed Me plugin to import contacts?

robinbeatty commented 1 year ago

For example, on the contacts/import/_fields template, you pass in the column headings as select options. Could there be a checkbox by a field to enable a further form for that field if e.g. any of the values contain "," then split the string and display dropdowns for each resulting value to map them onto existing craft elements.

Example:

In the csv we have a column called 'Categories', with values such as "category1, category2".

In craft we have a categories field on the campaign contact called 'Contact Categories'.

Could "category1", "category2" be mapped onto the corresponding category element (to post their corresponding ids in the form).

Realising as I write this that there are a lot of moving parts (would need to define which field / what if elements don't exist or are already defined differently / etc)...

Regarding possible FeedMe solution: FeedMe doesn't seem to offer Campaign Contacts as an element type in my installation – should it?

bencroker commented 1 year ago

Yes, there are a lot of moving parts and this would likely require the addition of lots of options, which is preferable to avoid whenever possible.

Campaign version 2.8.6 contains a fix for the integration with Feed Me, please update and check it out.