Assign Tenant based on Group using pdm_settenant

Document ID : KB000013590
Last Modified Date : 14/02/2018
Show Technical Document Details

Is it possible to set the Tenant on a ticket based on Group in bulk?


The pdm_settenant command can be used to set the Tenant to an object based on group by modifying the settenant.xml file.


NOTE: The settenant.xml file can be found in the following directory.





<Object name="cr">


<TenantRule type="Name">Service Provider</TenantRule>


<Where>tenant is null and group=U'CA4963375E920C43B56F2F1119C59B8F'</Where> 




What the example above will do is look for any "Request/Incident/Problem" and set the Tenant to "Service Provider" if the Tenant is null for that ticket AND if the Group assigned to the ticket equals the contact_uuid.


The contact_uuid for a Group can be found on the ca_contact table and will have to be modified to match the example above.

Each contact_uuid begins with 0x and will need to be replaced with then with single quotes around the id.


In order for the pdm_setatant command to run properly the following files need to be in the $NX_ROOT/site/cfg directory:



Once the setteant.xml file has been modified accordingly, open a command prompt and cd to $NX_ROOT/site/cfg

And run "pdm_settenant -f settenant.xml -r"


After the command completes any Request/Incident/Problem which has the Group specified assigned and did not have a Tenant assigned, will now have the Tenant specified in the TenantRule assigned to it.