The example for the XML body has some copy paste mistakes. $plan.type
should be $plan.fname
and $plan.lname` or something similar.
The documentation says (for an XML based body):
If the plan does not contain a lname attribute request, the source removes lname value as displayed in the example below:
So <lname>$plan.lname$</lname>
will become <lname></lname>
.
For account updates, if ISC wants to update the account and update fname
but keep lname
the same, the plan by default only contains fname
, but if the body contains <lname></lname>
. Depending on the behavior of the API, some server, interprets this as “The lname should be empty”, causing undesired effects. For such a trivial, often occurring operation we prefer not to use a rule. Is it therefore possible to use if-else logic in the body such that we can say something like this:
<worker>
#if($plan.hasKey('fname'))<fname>$plan.fname$</fname>#end
#if($plan.hasKey('lname'))<lname>$plan.lname$</lname>#end
<wid>$plan.nativeIdentity$</wid>
<description> permanent worker</description>
</worker>
Then, if the key exists (weather the related value is a new lname
or actually is an empty string or null, indicating that the value should be removed) we can ensure that we provision the new value and if it doesn’t that we don’t touch this attribute.
If such logical framework exists in the body, can we please get some documentation on this?
Kind regards,
Angelo