Quantcast
Viewing all articles
Browse latest Browse all 2504

Set Contact generic fields and custom fields SOAP (2 Comments)

Topic by Leonardo Barbosa

Hello all,

I have create a new contact with a Custom Fields and Generic Fields. But I have some problems to set Generic Fields like email and address fields like city, province.. See my XML code to better understand:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <ns7:ClientInfoHeader soapenv:mustUnderstand="0" xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:AppID>Create Contact</ns7:AppID>
      </ns7:ClientInfoHeader>
      <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>integracao.erp</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Mudar123</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns7:Create xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
         <ns7:RNObjects xsi:type="ns4:Contact" xmlns:ns4="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ns4:CustomFields xsi:type="ns2:GenericObject" xmlns:ns2="urn:generic.ws.rightnow.com/v1_2">
               <ns2:ObjectType>
                  <ns2:TypeName>ContactCustomFields</ns2:TypeName>
               </ns2:ObjectType>
                <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="NAMED_ID" name="estadocivil">
                           <ns2:DataValue>
                              <ns2:NamedIDValue>
                                 <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="233" />
                              </ns2:NamedIDValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                 <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="NAMED_ID" name="tipodepessoa">
                           <ns2:DataValue>
                              <ns2:NamedIDValue>
                                 <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="218" />
                              </ns2:NamedIDValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="NAMED_ID" name="sexo">
                           <ns2:DataValue>
                              <ns2:NamedIDValue>
                                 <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="9" />
                              </ns2:NamedIDValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields name="datanascimento">
                           <ns2:DataValue>
                              <ns2:DateValue>2015-01-08</ns2:DateValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields name="datacadastro">
                           <ns2:DataValue>
                              <ns2:DateValue>2015-01-08</ns2:DateValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
              <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="rg_ie">
                           <ns2:DataValue>
                              <ns2:StringValue>35713137</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="estado">
                           <ns2:DataValue>
                              <ns2:StringValue>SP</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                 <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="rg_ie">
                           <ns2:DataValue>
                              <ns2:StringValue>35713137</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="mensagem">
                           <ns2:DataValue>
                              <ns2:StringValue>MENSAGEM</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="url">
                           <ns2:DataValue>
                              <ns2:StringValue>URL</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="pais">
                           <ns2:DataValue>
                              <ns2:StringValue>PAIS</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="bairro">
                           <ns2:DataValue>
                              <ns2:StringValue>BAIRRO</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                 <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="ctrlfone1">
                           <ns2:DataValue>
                              <ns2:StringValue>99999999999</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                 <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="ctrlfone2">
                           <ns2:DataValue>
                              <ns2:StringValue>99999999999</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                 <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="ctrlfone3">
                           <ns2:DataValue>
                              <ns2:StringValue>99999999999</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                 <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="ctrlfone3">
                           <ns2:DataValue>
                              <ns2:StringValue>99999999999</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
                <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="desconto">
                           <ns2:DataValue>
                              <ns2:StringValue>99999999999</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="complemento">
                           <ns2:DataValue>
                              <ns2:StringValue>COMPLEMENTO</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="numero">
                           <ns2:DataValue>
                              <ns2:StringValue>365</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="cpf">
                           <ns2:DataValue>
                              <ns2:StringValue>3332225529</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="nomecompleto">
                           <ns2:DataValue>
                              <ns2:StringValue>COMPLETO</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="contato">
                           <ns2:DataValue>
                              <ns2:StringValue>CONTATO</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="profissao">
                           <ns2:DataValue>
                              <ns2:StringValue>PROFISSAO</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
               <ns2:GenericFields dataType="OBJECT" name="c">
                  <ns2:DataValue>
                     <ns2:ObjectValue xsi:type="ns2:GenericObject">
                        <ns2:ObjectType>
                           <ns2:TypeName>ContactCustomFieldsc</ns2:TypeName>
                        </ns2:ObjectType>
                        <ns2:GenericFields dataType="STRING" name="nomefantasia">
                           <ns2:DataValue>
                              <ns2:StringValue>NOME FANTASIA</ns2:StringValue>
                           </ns2:DataValue>
                        </ns2:GenericFields>
                     </ns2:ObjectValue>
                  </ns2:DataValue>
               </ns2:GenericFields>
            </ns4:CustomFields>
            <ns4:Name>
               <ns4:First>NOME</ns4:First>
               <ns4:Last>SURNAME</ns4:Last>
            </ns4:Name>
            <ns4:Title>TITOLO</ns4:Title>
         </ns7:RNObjects>
         <ns7:ProcessingOptions>
            <ns7:SuppressExternalEvents>false</ns7:SuppressExternalEvents>
            <ns7:SuppressRules>false</ns7:SuppressRules>
         </ns7:ProcessingOptions>
      </ns7:Create>
   </soapenv:Body>
</soapenv:Envelope>

 

The fields that I need: email, address, country, state/province and city

I try some ways but without success. How I can set it?

Someone can help me?

 

Best Regards


Viewing all articles
Browse latest Browse all 2504

Trending Articles