• Utpal Maity
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 10
    Replies
Hi ,

I am developing a custom integration application for creating sales orders in Salesforce. I am using xml for sending data in salesforce while calling the API. But I was unable to create the sales order in Sales force. The same data when I am sending using JSON is woking but with XNL it is not woking. I have converted the same JSON data to XML using the online tools but it is not working. 

My JSON eequest data is like this 

URL: https://ap2.salesforce.com/services/data/v30.0/commerce/sale/order 
 
 
HEADERS 
    Authorization: Bearer XXXXXXXXXXXXPANkBmIlOTVrgLcSJxArivqsXXX
    Content-Type : application/json 
 
 
REQUEST BODY 


   "order": [ 
   { 
      "attributes": { 
      "type": "Order" 
      }, 
      "EffectiveDate": "2015-04-11", 
      "Status": "Draft", 
      "billingCity": "SFO-Inside-OrderEntity-1", 
      "accountId": "00128000002l6q5AAA", 
      "Pricebook2Id": "01s28000000uD8IAAU", 
      "OrderItems": { 
         "records": [ 
            { 
            "attributes": { 
               "type": "OrderItem" 
            }, 
            "PricebookEntryId": "01u28000000eeirAAA", 
            "quantity": "1", 
            "UnitPrice": "15.99" 
            } 
         ] 
      } 
   } 
   ] 


and the XML request date is like this

REQUEST BODY


<order>
    <attributes>
        <type>order</type>
    </attributes>
    <EffectiveDate>2015-04-11</EffectiveDate>
    <Status>Draft</Status>
    <billingCity>SFO-Inside-OrderEntity-1</billingCity>
    <accountId>00128000002l6q5AAA</accountId>
    <Pricebook2Id>01s28000000uD8IAAU</Pricebook2Id>
    <OrderItems>
        <records>
            <attributes>
                <type>OrderItem</type>
            </attributes>
            <PricebookEntryId>01u28000000eeirAAA</PricebookEntryId>
            <quantity>1</quantity>
            <UnitPrice>15.99</UnitPrice>
        </records>
    </OrderItems>
</order>

But the xml is not working it is giving error 

An unexpected error occurred. Please include this ErrorId if you contact support: 697865704-94096 (-871941818)

Please suggest some wayout.

Thanks in advance
Hi ,

I am developing a custom integration application for creating sales orders in Salesforce. I am using xml for sending data in salesforce while calling the API. But I was unable to create the sales order in Sales force. The same data when I am sending using JSON is woking but with XNL it is not woking. I have converted the same JSON data to XML using the online tools but it is not working. 

My JSON eequest data is like this 

URL: https://ap2.salesforce.com/services/data/v30.0/commerce/sale/order 
 
 
HEADERS 
    Authorization: Bearer XXXXXXXXXXXXPANkBmIlOTVrgLcSJxArivqsXXX
    Content-Type : application/json 
 
 
REQUEST BODY 


   "order": [ 
   { 
      "attributes": { 
      "type": "Order" 
      }, 
      "EffectiveDate": "2015-04-11", 
      "Status": "Draft", 
      "billingCity": "SFO-Inside-OrderEntity-1", 
      "accountId": "00128000002l6q5AAA", 
      "Pricebook2Id": "01s28000000uD8IAAU", 
      "OrderItems": { 
         "records": [ 
            { 
            "attributes": { 
               "type": "OrderItem" 
            }, 
            "PricebookEntryId": "01u28000000eeirAAA", 
            "quantity": "1", 
            "UnitPrice": "15.99" 
            } 
         ] 
      } 
   } 
   ] 


and the XML request date is like this

REQUEST BODY


<order>
    <attributes>
        <type>order</type>
    </attributes>
    <EffectiveDate>2015-04-11</EffectiveDate>
    <Status>Draft</Status>
    <billingCity>SFO-Inside-OrderEntity-1</billingCity>
    <accountId>00128000002l6q5AAA</accountId>
    <Pricebook2Id>01s28000000uD8IAAU</Pricebook2Id>
    <OrderItems>
        <records>
            <attributes>
                <type>OrderItem</type>
            </attributes>
            <PricebookEntryId>01u28000000eeirAAA</PricebookEntryId>
            <quantity>1</quantity>
            <UnitPrice>15.99</UnitPrice>
        </records>
    </OrderItems>
</order>

But the xml is not working it is giving error 

An unexpected error occurred. Please include this ErrorId if you contact support: 697865704-94096 (-871941818)

Please suggest some wayout.

Thanks in advance
Hi ,

I am developing a custom integration application for creating sales orders in Salesforce. I am using xml for sending data in salesforce while calling the API. But I was unable to create the sales order in Sales force. The same data when I am sending using JSON is woking but with XNL it is not woking. I have converted the same JSON data to XML using the online tools but it is not working. 

My JSON eequest data is like this 

URL: https://ap2.salesforce.com/services/data/v30.0/commerce/sale/order 
 
 
HEADERS 
    Authorization: Bearer XXXXXXXXXXXXPANkBmIlOTVrgLcSJxArivqsXXX
    Content-Type : application/json 
 
 
REQUEST BODY 


   "order": [ 
   { 
      "attributes": { 
      "type": "Order" 
      }, 
      "EffectiveDate": "2015-04-11", 
      "Status": "Draft", 
      "billingCity": "SFO-Inside-OrderEntity-1", 
      "accountId": "00128000002l6q5AAA", 
      "Pricebook2Id": "01s28000000uD8IAAU", 
      "OrderItems": { 
         "records": [ 
            { 
            "attributes": { 
               "type": "OrderItem" 
            }, 
            "PricebookEntryId": "01u28000000eeirAAA", 
            "quantity": "1", 
            "UnitPrice": "15.99" 
            } 
         ] 
      } 
   } 
   ] 


and the XML request date is like this

REQUEST BODY


<order>
    <attributes>
        <type>order</type>
    </attributes>
    <EffectiveDate>2015-04-11</EffectiveDate>
    <Status>Draft</Status>
    <billingCity>SFO-Inside-OrderEntity-1</billingCity>
    <accountId>00128000002l6q5AAA</accountId>
    <Pricebook2Id>01s28000000uD8IAAU</Pricebook2Id>
    <OrderItems>
        <records>
            <attributes>
                <type>OrderItem</type>
            </attributes>
            <PricebookEntryId>01u28000000eeirAAA</PricebookEntryId>
            <quantity>1</quantity>
            <UnitPrice>15.99</UnitPrice>
        </records>
    </OrderItems>
</order>

But the xml is not working it is giving error 

An unexpected error occurred. Please include this ErrorId if you contact support: 697865704-94096 (-871941818)

Please suggest some wayout.

Thanks in advance
Hi ,

I am developing a custom integration application for creating sales orders in Salesforce. I am using xml for sending data in salesforce while calling the API. But I was unable to create the sales order in Sales force. The same data when I am sending using JSON is woking but with XNL it is not woking. I have converted the same JSON data to XML using the online tools but it is not working. 

My JSON eequest data is like this 

URL: https://ap2.salesforce.com/services/data/v30.0/commerce/sale/order 
 
 
HEADERS 
    Authorization: Bearer XXXXXXXXXXXXPANkBmIlOTVrgLcSJxArivqsXXX
    Content-Type : application/json 
 
 
REQUEST BODY 


   "order": [ 
   { 
      "attributes": { 
      "type": "Order" 
      }, 
      "EffectiveDate": "2015-04-11", 
      "Status": "Draft", 
      "billingCity": "SFO-Inside-OrderEntity-1", 
      "accountId": "00128000002l6q5AAA", 
      "Pricebook2Id": "01s28000000uD8IAAU", 
      "OrderItems": { 
         "records": [ 
            { 
            "attributes": { 
               "type": "OrderItem" 
            }, 
            "PricebookEntryId": "01u28000000eeirAAA", 
            "quantity": "1", 
            "UnitPrice": "15.99" 
            } 
         ] 
      } 
   } 
   ] 


and the XML request date is like this

REQUEST BODY


<order>
    <attributes>
        <type>order</type>
    </attributes>
    <EffectiveDate>2015-04-11</EffectiveDate>
    <Status>Draft</Status>
    <billingCity>SFO-Inside-OrderEntity-1</billingCity>
    <accountId>00128000002l6q5AAA</accountId>
    <Pricebook2Id>01s28000000uD8IAAU</Pricebook2Id>
    <OrderItems>
        <records>
            <attributes>
                <type>OrderItem</type>
            </attributes>
            <PricebookEntryId>01u28000000eeirAAA</PricebookEntryId>
            <quantity>1</quantity>
            <UnitPrice>15.99</UnitPrice>
        </records>
    </OrderItems>
</order>

But the xml is not working it is giving error 

An unexpected error occurred. Please include this ErrorId if you contact support: 697865704-94096 (-871941818)

Please suggest some wayout.

Thanks in advance
Hi ,

I am developing a custom integration application for creating sales orders in Salesforce. I am using xml for sending data in salesforce while calling the API. But I was unable to create the sales order in Sales force. The same data when I am sending using JSON is woking but with XNL it is not woking. I have converted the same JSON data to XML using the online tools but it is not working. 

My JSON eequest data is like this 

URL: https://ap2.salesforce.com/services/data/v30.0/commerce/sale/order 
 
 
HEADERS 
    Authorization: Bearer XXXXXXXXXXXXPANkBmIlOTVrgLcSJxArivqsXXX
    Content-Type : application/json 
 
 
REQUEST BODY 


   "order": [ 
   { 
      "attributes": { 
      "type": "Order" 
      }, 
      "EffectiveDate": "2015-04-11", 
      "Status": "Draft", 
      "billingCity": "SFO-Inside-OrderEntity-1", 
      "accountId": "00128000002l6q5AAA", 
      "Pricebook2Id": "01s28000000uD8IAAU", 
      "OrderItems": { 
         "records": [ 
            { 
            "attributes": { 
               "type": "OrderItem" 
            }, 
            "PricebookEntryId": "01u28000000eeirAAA", 
            "quantity": "1", 
            "UnitPrice": "15.99" 
            } 
         ] 
      } 
   } 
   ] 


and the XML request date is like this

REQUEST BODY


<order>
    <attributes>
        <type>order</type>
    </attributes>
    <EffectiveDate>2015-04-11</EffectiveDate>
    <Status>Draft</Status>
    <billingCity>SFO-Inside-OrderEntity-1</billingCity>
    <accountId>00128000002l6q5AAA</accountId>
    <Pricebook2Id>01s28000000uD8IAAU</Pricebook2Id>
    <OrderItems>
        <records>
            <attributes>
                <type>OrderItem</type>
            </attributes>
            <PricebookEntryId>01u28000000eeirAAA</PricebookEntryId>
            <quantity>1</quantity>
            <UnitPrice>15.99</UnitPrice>
        </records>
    </OrderItems>
</order>

But the xml is not working it is giving error 

An unexpected error occurred. Please include this ErrorId if you contact support: 697865704-94096 (-871941818)

Please suggest some wayout.

Thanks in advance