Set metadata value in alternate context via SOAP API


(Wojtek Bronikowski) #1

Hi All,

wondering if anyone has an answer to that.

I use the SOAP API extensively to manage our content across systems. We are planning to start utilising Context to target geographic regions with personalised content. However, I cannot find a way to set metadata with the SOAP web service in an Alternate Context. I assume it is not possible. Am I right?

Is there any other way to achieve that I am missing? I mean, we need to be able to Set Metadata Values in Alternate Context via an API call as most of the data is set in this way so the answer will weight on the decision to use Context or not altogether.

JS API supports setting alternate context but doing it from a different domain is not a straightforward solution and I have not used it a lot so not sure.

Would appreciate any help with this issue.

Wojtek


(Bart Banda) #2

You could use a trigger to do it? Check out the set metadata trigger action: https://matrix.squiz.net/manuals/triggers/chapters/trigger-actions#Set-Metadata-Value


(Wojtek Bronikowski) #3

Thanks Bart,

That might just be the solution. I will update this thread once this is working.

Wojtek


(Wojtek Bronikowski) #4

Hi Bart,
I have set up a test for this and the trigger sets metadata in Global context with no issues but unfortunately that fails in any other context. I did make sure the Metadat Field is contextbale and could not find any other reason it would fail.

Wondering if anyone has ever managed to make it work? I am using Matrix 5.4.0.0


(Bart Banda) #5

Interesting, does the asset you are trying the trigger run on already have a customised Metadata for the context you are trying? As in, have you already customised the metadata for that context on that asset, and then tried running the trigger?

I have a feeling the metadata needs to be customised first before the trigger can set a value for that context.


(Wojtek Bronikowski) #6

Thanks Bart,
Yes, this seems to be the case. We found a different solution for now but if this worked on new assets as well (we create those assets programatically and then want to apply the contextualised metadat via triggers) it would serve our puropse.

By the way, any plans for adding context functionality to the SOAP API?

Thanks for your help anyway.


(Bart Banda) #7

Not at the moment. We don’t really have many users using the SOAP API these days as most people use the JS API or Triggers. I think it might be mainly due to the dying art of using SOAP in general as REST has really taken over as the best practice way of integrating between third-party apps in general.