com.axeda.drm.sdk.contact.Contact

Hi 
According to the Axeda SDK Java Docs the .Contact namespace provides the ability to add a new contact into the Axeda via Scripto. There are the methods to provide the params for this contact like setFirstName,setMiddleName,setOrganization and so on. But throught Axeda web interface also possible to add to the contact email and phone number and I can not find the ability to add the email and phone number via Scripto. Is there the way to do this (add via Scripto to the contact email and phone)?

Thanks in advance for response.

 

Contact Information SDK

Hi, I'm afraid this is a gap in our Contact SDK class currently. We've got this on our list to address in the next release. Might I suggest in the meantime to use the Nickname and JobTitle fields to store that information in the meantime? I understand that this is not optimal, but if your primary need is to populate contact information via an external system, this could at least work inthe current release. I'm happy to discuss your use case further to look for other solutions.

Hi, Thanks for your answer.

Hi,

Thanks for your answer. Actually what I need is to fill the fields email and phone in order to use it in the notification system ( when some alarm has happend the contact responsible for the device should obtain tha email or sms ) If it is possible to use Nickname and JobTitle filled with information regarding email and phone number it will be great. Is it possible and if possible in whichh way?

 

Thanks in advance for response.

Slated for upcoming service pack

Hello Oleksandr. It turns out that we have addressed this limitation in our forthcoming 6.1.1 service pack. As an Axeda OnDemand customer, you can follow up with Axeda support for the details on the rollout schedule.

This enhancement will provide a new method on the Contact SDK class which will allow adding any contact method, including email and phone, in this fashion:

 

(the rest of this post comment is example Groovy code using the above-mentioned future SDK)


Context ctx1 = context.getContext()
Device device = context.getDevice()
Organization organization = device.getCustomer()
Location location = device.getLocation()
Contact contact = new Contact(ctx1,
                              "Mr.",
                              "John",
                              "D",
                              "Due",
                              "III",
                              null,
                              "Software Developer",
                              organization,
                              location)
                             
contact.addContactMethod(ContactMethodType.getEmailContactMethodType(ctx1), "support@axeda.com")
contact.addContactMethod(ContactMethodType.getMobileContactMethodType(ctx1), "1117186326")
contact.addContactMethod(ContactMethodType.getFaxContactMethodType(ctx1), "0007186326")
contact.store()
ContactFinder cf = new ContactFinder(ctx1)
cf.setId(contact.getId())
contact = (Contact)cf.findOne()
logger.info("ID: " + contact.getId())
logger.info("FirstName: " + contact.getFirstName())
logger.info("MiddleName: " + contact.getMiddleName())
logger.info("LastName: " + contact.getLastName())
logger.info("Contact Methods Size: " + contact.getContactMethods().size())
logger.info("E-mail: " + contact.getContactMethod(ContactMethodType.getEmailContactMethodType(ctx1)))
logger.info("Mobile: " + contact.getContactMethod(ContactMethodType.getMobileContactMethodType(ctx1)))
logger.info("Fax: " + contact.getContactMethod(ContactMethodType.getFaxContactMethodType(ctx1)))

contact.removeContactMethod(ContactMethodType.getFaxContactMethodType(ctx1))
contact.store()
contact = (Contact)cf.findOne()
logger.info("")
logger.info("***************************************")
logger.info("After Removing the Fax from Contact info")
logger.info("****************************************")
logger.info("Contact Methods Size: " + contact.getContactMethods().size())
logger.info("Fax: " + contact.getContactMethod(ContactMethodType.getFaxContactMethodType(ctx1)))




Hi Thank you for the

Hi

Thank you for the response. We'll be waiting for this service pack.