Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Luuk
    Setting the queue id and status field using the soap api XMLAnswered
    Topic posted September 15, 2015 by Luuk Bronze Crown: 15,000+ Points, tagged SOAP 
    259 Views, 4 Comments
    Title:
    Setting the queue id and status field using the soap api XML
    Content:

    Goodmorning,

    I'm having some issues with the SOAP API.
    I'm trying to set the queue and status on create but I keep receiving the error message: Data element in the Message is NULL

    I tried adding the queue to the code:

    <ns4:Queue>
     <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="12"/>
     </ns4:Queue>

    and the status:

        <ns4:StatusWithType>
                    <ns4:Status>
                    <ID xmlns="urn:base.ws.rightnow.com/v1" id="4" />
                    </ns4:Status>
                </ns4:StatusWithType>

    Is there someone who can tell me what I'm doing wrong because the documentation is a bit vague on the matter.

    I've attached the entire code to the this post in the code block.

    Thank you very much in advance.

    Kind Regards,
    Luuk

    Version:
    Aug 14
    Code Snippet:

    Best Comment

    Narendra Muttineni

    Hi Luuk,

    Please use the below request.

    <ns7:Create xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
    <ns7:RNObjects xsi:type="ns4:Incident" xmlns:ns4="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

        <ns4:PrimaryContact>
                        <ns4:Contact>
                            <ID id="437736" xmlns="urn:base.ws.rightnow.com/v1_2"/>
                        </ns4:Contact>
             </ns4:PrimaryContact>
    <ns4:Queue>
                      <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="12"/>
                    </ns4:Queue>  
    <ns4:StatusWithType>
                    <ns4:Status>
                    <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="8" />
                    </ns4:Status>
                </ns4:StatusWithType>
    <ns4:Subject>This is a test Incident</ns4:Subject>
    <ns4:Threads>
                  <ns4:ThreadList action="add">
                    <ns4:EntryType>
                      <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="1"/>
                    </ns4:EntryType>
                    <ns4:Text>Example note</ns4:Text>
                  </ns4:ThreadList>
                </ns4:Threads> 
        </ns7:RNObjects>
        <ns7:ProcessingOptions>
                    <ns7:SuppressExternalEvents>false</ns7:SuppressExternalEvents>
                    <ns7:SuppressRules>false</ns7:SuppressRules>
                </ns7:ProcessingOptions>
        </ns7:Create>

    RightNow soap request follows some architecture. So here after PrimaryContact you must pass the Queue Id and then Statuswithtype.

    Hope it would be helpful for you.

    Regards,

    Narendra 

    Comment

     

    • Narendra Muttineni

      Hi Luuk,

      Please use the below request.

      <ns7:Create xmlns:ns7="urn:messages.ws.rightnow.com/v1_2">
      <ns7:RNObjects xsi:type="ns4:Incident" xmlns:ns4="urn:objects.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

          <ns4:PrimaryContact>
                          <ns4:Contact>
                              <ID id="437736" xmlns="urn:base.ws.rightnow.com/v1_2"/>
                          </ns4:Contact>
               </ns4:PrimaryContact>
      <ns4:Queue>
                        <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="12"/>
                      </ns4:Queue>  
      <ns4:StatusWithType>
                      <ns4:Status>
                      <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="8" />
                      </ns4:Status>
                  </ns4:StatusWithType>
      <ns4:Subject>This is a test Incident</ns4:Subject>
      <ns4:Threads>
                    <ns4:ThreadList action="add">
                      <ns4:EntryType>
                        <ID xmlns="urn:base.ws.rightnow.com/v1_2" id="1"/>
                      </ns4:EntryType>
                      <ns4:Text>Example note</ns4:Text>
                    </ns4:ThreadList>
                  </ns4:Threads> 
          </ns7:RNObjects>
          <ns7:ProcessingOptions>
                      <ns7:SuppressExternalEvents>false</ns7:SuppressExternalEvents>
                      <ns7:SuppressRules>false</ns7:SuppressRules>
                  </ns7:ProcessingOptions>
          </ns7:Create>

      RightNow soap request follows some architecture. So here after PrimaryContact you must pass the Queue Id and then Statuswithtype.

      Hope it would be helpful for you.

      Regards,

      Narendra 

    • Luuk

      Wow that works like a charm.

      I was close but not just there yet.

      Thank you very much!

    • praneeth kuppa

      Hi Narendra,

      Thanks for the update.Please let me know the order in which the tags are to be written.

      Thanks,

      Praneeth

       

    • Narendra Muttineni