PureEngage On-Premises

 View Only

Sign Up

  • 1.  UCS UpdateAttribute Isn't updating an attribute

    Posted 09-23-2016 15:14
    using (UniversalContactServerProtocol ucsConnection = new UniversalContactServerProtocol(new Endpoint("UCS", ucsHost, ucsPort)))
                {
                    ucsConnection.Open();
    
                    //look for the contact based on customerNumber
                    var search = new RequestSearch();
                    search.Query = "CustomerNumber:2655486";
                    search.IndexName = "contact";
    
                    var searchResult = (EventSearch)Convert.ChangeType(ucsConnection.Request(search), typeof(EventSearch));
                    if (searchResult.Documents.Count > 0)
                    {
                        //assume doc[0] has what im looking for
                        //get contactId - should be Guy ingram
                        var contactId = searchResult.Documents[0].Fields["Id"].ToString();
                        var attributeReq = new RequestUpdateAttributes();
                        attributeReq.ContactId = contactId;
                        attributeReq.TenantId = 1;
    
    
                        genCon.AttributesList cl = new genCon.AttributesList();
                        var attr = new genCon.AttributesHeader();
                        attr.AttributesInfoList = new genCon.AttributesInfoList();
                        attr.AttributesInfoList.Add(new genCon.AttributesInfo() {  AttrId = "00001aB9HP0B000P",  AttrValue = "foo", });
                        
                        cl.Add(attr);
                        //now changing Guy's lastname to "foo"
    
                        attributeReq.UpdateAttributes = cl;
                        var returnVal = ucsConnection.Request(attributeReq);
                    }
                         
                }
    The above code is finding a user within UCS and updating an attribute. We have existing CRM system and we need to sync data from our existing CRM to UCS.

    When I query the UCS db, I'm not seeing the attribute value change....Any help would be greatly appreciated.

    this is my response:

    {'EventUpdateAttributes' ('111')
    message attributes:
    ReferenceId     = 2
    }


  • 2.  RE: UCS UpdateAttribute Isn't updating an attribute

    Posted 09-26-2016 10:14
    What say UCS logs?


  • 3.  RE: UCS UpdateAttribute Isn't updating an attribute

    Posted 09-26-2016 13:26
     Multiple Primary Values Defined : Contact UCSID='0000VaBE2SME002M' : can not set more than one Primary value for ContactAttribute Type UCSID='00001aB9HP0B000W'. Attributes in database : StrValue=(String)"2655486"|Description=null|MimeType=null|StrValueLowerCase=(String)"2655486"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"CustomerNumber"|Id=(String)"0000VaBE2SME002N"|ContactId=(String)"0000VaBE2SME002M"|AttributeId=(String)"00001aB9HP0B000K"|DateValue=null, StrValue=(String)"2655486"|Description=null|MimeType=null|StrValueLowerCase=(String)"2655486"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"AccountNumber"|Id=(String)"0000VaBE2SME002P"|ContactId=(String)"0000VaBE2SME002M"|AttributeId=(String)"00001aB9HP0B000T"|DateValue=null, StrValue=(String)"guy.ingram@gingram-consulting.com"|Description=null|MimeType=null|StrValueLowerCase=(String)"guy.ingram@gingram-consulting.com"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"EmailAddress"|Id=(String)"0000VaBE2SME002Q"|ContactId=(String)"0000VaBE2SME002M"|AttributeId=(String)"00001aB9HP0B000R"|DateValue=null, StrValue=(String)"6147518071"|Description=null|MimeType=null|StrValueLowerCase=(String)"6147518071"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"PhoneNumber"|Id=(String)"0000VaBE2SME002R"|ContactId=(String)"0000VaBE2SME002M"|AttributeId=(String)"00001aB9HP0B000S"|DateValue=null, StrValue=(String)"INGRAM"|Description=null|MimeType=null|StrValueLowerCase=(String)"ingram"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"LastName"|Id=(String)"0000VaBE2SME


  • 4.  RE: UCS UpdateAttribute Isn't updating an attribute

    Posted 09-26-2016 14:00
    As the log says, you are setting up the contact with multiple primary contact address, which is not possible at all.


  • 5.  RE: UCS UpdateAttribute Isn't updating an attribute

    Posted 10-03-2016 19:16
    Jakub,

    Now Im getting the following error:

    19:14:20.415 Server: bos_ucs_p Msg: Unexpected error (No Primary Values Defined : Contact UCSID='00010aBX5CW3001W' : can not set zero Primary value for ContactAttribute Type UCSID='0000SaBCVEPF0GQ9'. Attributes in database : StrValue=(String)"Mr"|Description=null|MimeType=null|StrValueLowerCase=(String)"mr"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"Title"|Id=(String)"00010aBX5CW3001X"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000Q"|DateValue=null, StrValue=(String)"02067"|Description=null|MimeType=null|StrValueLowerCase=(String)"02067"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"ZipCode"|Id=(String)"00010aBX5CW3001Y"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00005aB9HS9F001D"|DateValue=null, StrValue=(String)"Wijesinghe"|Description=null|MimeType=null|StrValueLowerCase=(String)"wijesinghe"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"LastName"|Id=(String)"00010aBX5CW30020"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000P"|DateValue=null, StrValue=(String)"508-208-1631"|Description=null|MimeType=null|StrValueLowerCase=(String)"508-208-1631"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"GERTPhoneNumber"|Id=(String)"00010aBX5CW30021"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"0000SaBCVEPF0GQ9"|DateValue=null, StrValue=(String)"manzyron@hotmail.com"|Description=null|MimeType=null|StrValueLowerCase=(String)"manzyron@hotmail.com"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"GERTEmailAddress"|Id=(String)"00010aBX5CW30022"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"0000SaBCVEPF0GQA"|DateValue=null, StrValue=(String)"Channa"|Description=null|MimeType=null|StrValueLowerCase=(String)"channa"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"FirstName"|Id=(String)"00010aBX5CW30023"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000N"|DateValue=null, StrValue=(String)"27268820"|Description=null|MimeType=null|StrValueLowerCase=(String)"27268820"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"CustomerNumber"|Id=(String)"00010aBX5CW30024"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000K"|DateValue=null, StrValue=(String)"5082081631"|Description=(String)"test "|MimeType=null|StrValueLowerCase=(String)"5082081631"|IsPrimary=(Boolean)true|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"PhoneNumber"|Id=(String)"00010aBX5CW30025"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000S"|DateValue=null, StrValue=(String)"5082081631"|Description=null|MimeType=null|StrValueLowerCase=(String)"5082081631"|IsPrimary=(Boolean)false|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"PhoneNumber"|Id=(String)"00010aBX5CW30026"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000S"|DateValue=null, StrValue=(String)"5555555555"|Description=null|MimeType=null|StrValueLowerCase=(String)"5555555555"|IsPrimary=(Boolean)false|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"PhoneNumber"|Id=(String)"00010aBX5CW30027"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000S"|DateValue=null, StrValue=(String)"test2@gct.com"|Description=(String)"test 2 email "|MimeType=null|StrValueLowerCase=(String)"test2@gct.com"|IsPrimary=(Boolean)false|SubTenantId=null|TenantId=(Integer)1|BinValue=null|AttributeName=(String)"EmailAddress"|Id=(String)"00010aBX5CW30028"|ContactId=(String)"00010aBX5CW3001W"|AttributeId=(String)"00001aB9HP0B000R"|DateValue=null - Attributes to insert :  - Attributes to update : StrValue=(String)"55555555555"|Description=null|TenantId=(Integer)1|AttributeName=(String)"GERTPhoneNumber"|ContactId=(String)"00010aBX5CW3001W"|Id=(String)"00010aBX5CW30021"|StrValueLowerCase=(String)"55555555555"|IsPrimary=(Boolean)false|AttributeId=(String)"0000SaBCVEPF0GQ9" - Attributes to delete : )
    ReferenceId     = 2
    }

     


  • 6.  RE: UCS UpdateAttribute Isn't updating an attribute

    Posted 07-24-2017 13:13
    Hi,

    I'm having similar problem. I can only insert contact Attributes via Platform SDK when there is no previous (Primary) Attribute. Is there any way to insert the Attribute as non-primary?

    Thank you

    Iván