0

xmtoolbox data synchronization with person properties

Does anyone have sample code we could leverage to sync properties in xmtoolbox?


We are attempting to use Node.js with the xmtoolbox-quick-start-master to sync data to our xMatters instance.   We are new to node.js and are leveraging the FilesToxMatters.js and are able to successfully sync most fields except our custom people properties fields.


We have a PROPERTIES column in our csv file with values that match existing custom property fields we use. The pairs are delimited by a "|" pipe characters.  We have validated the key for each pair matches the field name in our custom fields.  Example:


PROPERTIES
Dept Number:Q76010|Office Country:United States|Office Postal:54321

We also have 'properties' defined in peopleFields
const peopleFields = [
'operations',
'externallyOwned',
'firstName',
'lastName',
'properties',
'recipientType',
'roles',
'site',
'status',
'supervisors',
'targetName',
'webLogin',
];


We have unsuccessfully attempted to assign the value from the PROPERTIES column to the properties field in the same way we are assigning roles, but this does not work for properties.


if (row.PROPERTIES) person.properties = (row.PROPERTIES.split('|'));

 

0 comments

Please sign in to leave a comment.