nopSolutions / sendinblue-plugin-for-nopcommerce

Plugin for sendinblue.com (mail)
https://www.nopcommerce.com/
GNU General Public License v3.0
2 stars 6 forks source link

Getting error for extra attributes with boolean type #4

Open jigarsangoi opened 4 years ago

jigarsangoi commented 4 years ago

nopCommerce 4.10 Add field with type "boolean" in sendinblue "Contact & Attributes CRM"

I attached screenshot. Please check it. this error is coming in "SendInBlueManager.cs" file on line no 943

var attributes = client.GetAttributes(); since its library I cant do much to solve this issue also when I search for this nuget package I dont find it sendinblue_error

MattHobson1968 commented 4 years ago

I encountered a similar issue with the OPT_IN Attribute when that was defined as Boolean. I am not using it so a deleted in Send in Blue and this fixed the error. I recreated it as a TEXT field and not Boolean and no error was thrown. It appears that the routine cant handle Boolean Attributes from SendinBlue.

jigarsangoi commented 4 years ago

@MattHobson1968 yes you are right. I also tried same thing with other field but in that case I lost data. is there way I can transfer data into new field ? Also I think this issue must be resolved because no one think that it wont work with boolean at first place.

This issue comes from Client V3.45 dll and I don't find its nuget package too so I think its maintained by nopCommerce team

MattHobson1968 commented 4 years ago

@jigarsangoi I am not sure to be honest as I am quite new to SendinBlue. Not sure if you can export your contacts out and then create the field with a different datatype and then reimport the contacts and map the field that way, to get around the exception. Hopefully a patch will be about soon as it only appears to work with TEXT and NUMBER attribute datatypes at the moment. I have to admit the SendinBlue product is far better than Mailchimp (in my opinion) as we discovered recently that mailchimp was not even distributing to all our contacts in our campaigns. It reported that they had been delievered , opened and even clicked on, but when it said I had also done it, alarm bells started to ring. We have since seen a 20% increase in our open rates and sales from emails have increased significantly.

jigarsangoi commented 4 years ago

@MattHobson1968 yes first export then import again can be option but I dont want to loose data while trying this workaround. since due to exception sendinblue dont insert firstname and last name into nome and cognome respectively in Italian. so I changed little code in CATCH block to overcome effects of this issue.

MattHobson1968 commented 4 years ago

@jigarsangoi Please could you share the code modification as I have noticed that the error occurs again once a scheduled Synchronisation occurs. It actually created a new attribute called OPTIN_1 with Boolean and then the error returned !! Deleted the attribute, all fine, until synchronisation occurred and hey presto, the attribute is recreated and error starts again !! Obviously its not handling a Boolean value with a NULL value, it probably only expects true or false !

jigarsangoi commented 4 years ago

@MattHobson1968 Even with that error data synchronize properly. My change only able to insert/update FirstName and LastName into correct column in sendinblue & it only helpful if you are using language other than English.

Are you using any one of these language in SendInBlue: French, German, Italian, Portuguese OR Spanish