Custom Fields data


#1

Hi there,

I’m having troubles with custom fields. I try to pass several data to the notification.
I used the following script:

WonderPush.ready(function(WonderPushSDK) {
	    WonderPushSDK.putInstallationCustomProperties({
	        int_budget: 234,
		string_category: "wordpress",
	    });
});

Two problems:

  • when I try to transforme datas into object, I cannot access those in the title of my notification edit window.
  • And then if I update these values, they are stucked to the previous one.

Can you help me with that?

Thanks,

Antoine


#2

Hi Antoine,

The code you use to put custom properties to your installation is fine.
You can check this in your dashboard, one of your 2 installations has custom properties.

The “Project” notification you have created is well written and should use the 2 custom properties of your message.

  • when I try to transforme datas into object, I cannot access those in the title of my notification edit window.

Can you show me an example of what you mean by “transforming data into object”?

  • And then if I update these values, they are stucked to the previous one.

You mean that the installation custom properties no longer update?
Can you show me an example code too?

Best,
Olivier


#3

Hi Olivier,

I actually fixed those problems. But to be sure I understood properly, when I set a custom field with WonderPush.putInstallationCustomProperties, it is recorded in the user “Données personnalisées” (in french) and will remain unchanged until we update it again with WonderPush.putInstallationCustomProperties?


#4

You are absolutely right.