function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
expeditebizexpeditebiz 

DHL Shipping Integration

Our company developed DHL hosted SOAP Web Service: dhl.expediteship.com

I just signed for Sforce developer program in order to connect the two SOAP Web
Services.

I need to get the fields required to preform a shipping request. Basically when shipping is performed
2 addresses are required: Shipper, Consignee. Also product info: Dimensions, Weight, Price.

Because I am new to Salesforce I will appreciate any help to get this project running faster.

DevAngelDevAngel

Hi expediteblitz,

Is your question how to get the fields or where to get the fields from?

Address information can be obtained from an Account object (company address), a contact or lead object (person address), an organization or user object (sender address).

For the product specifics (dimension and weight), these would need to be custom fields created on a product object.  The product object provides for pricing.

How to get this information depends on how the "connection" between the 2 services is implmented.  In one case you may want to click a link on an opportunity (the opportunity roughly represents a purchase transaction) to initiate the shipping process.  In this case, some of the data can be passed on the link and the rest of the data would need to be obtained via query calls (Select address from account where id = accountid).

If you provide more information on the direction that you are thinking in I would be happy to assist in any way.

 

Cheers

expediteshipexpediteship

I want to renew this topic.

The project I make is VB.NET client.

I want to call Sforce via SOAP API and get orders made via Sforce UI.

So the questions are:
1) How to add product details for weight and dimensions and how to access them via query.
ProductWeight
ProductDimension
- I need a query.
2) How to get order (sale) ID's made. How to distinguish closed orders. - I need a query.
3) How to get the specific order info when I make a call with selected order ID.  
The info needed is:
ShipFrom Address
ShipToAddress
ProductName
ProductValue
ProductWeight
ProductDimension
-  I need a query.

DevAngelDevAngel

Hi expediteship,

First, you need to add 2 or 4 customfields to the product object.  ProductWeight and ProductDimension (or possibly ProductHeight and ProductWidth and ProductDepth).  You can then enter the appropriate values for each product.

If an opportunity and it's line items (products) represent an order, then to get the requisite data you would issue a query using a soql statement similar to this.

Select Id, TotalPrice, UnitPrice, ListPrice, Quantity, PricebookEntryId From OpportunityLineItems Where OpportunityId = '00630000000h8dQAAQ'

This will give you the detail of the order.  The next thing to do is to get the product details which is why I included the PricebookEntryId.  Using this we can obtain the specific product details of each line item.  Loop through the previous results and collect up the PricebookEntryId's into a string array. 

QueryResult qr = binding.query("<soql from above>");

ArrayList pricebookentryIds = new ArrayList();

for (int i=0;i<qr.records.Length;i++) {

     pricebookentryIds.Add(qr.records[i].id);

}

string[] ids = (string)pricebookentryIds.ToArray(typeof(string));

You can then pass this array of ids using the retrieve call to fetch the PricebookEntrys for the opportunity.

SObject[] pricebookentries = binding.retrieve("Id, Product2Id", "PricebookEntry", pricebookentryIds);

Place all the Product2Ids into a string array also.

string[] product2Ids = new string[pricebookentries.Length];

for (int i=0;i<pricebookentries.Length;i++)

    product2Ids[i] = ((PricebookEntry)pricebookentries[i]).Product2Id;

No you can retrieve the products.

SObject[] products = binding.retrieve("Id, ProductDimension, ProductWeight, ProductCode", "Product2", product2Ids);

To distinguish closed orders (as indicated by opportunity stage) you would select using Where not Stage Like 'Closed%' in your query of the opportunity.

To get the rest of the information, you will need to grab the account id from the opporunity and then retrieve or query the account object using the id as a criteria.

Bottom line, there is no single query to do what you want.  You will have to do this "step-wise".

 

expediteshipexpediteship
Thanks a lot!

I will do it now to test.

Also I have one more question. Are there anybody in Sforce.com
experienced with Sforce.com integration in GrandCentral network?

There are Sforce connectors for GrandCentral and I have some
specific questions for them.

Can anybody help me on this topis too? I will be glad to provide
more details.
expediteshipexpediteship
Also - one more question - where to add the product price?
expediteshipexpediteship
Are there a way when I work in Opportunity screen to be able to get
a list of Product to choose from?
expediteshipexpediteship
Where to add Line Items (Products) in Opportunity?
And how to choose Products from a list?
expediteshipexpediteship
account id from the opporunity  - is this the customer info - how to get his Address to ship to?
DevAngelDevAngel

Take a look at the sforce explorer or the object definitions in the documentation.

 

expediteshipexpediteship
Sforce explorer is excellent program. I try to
compile it but receive an errors - missing sObject, etc.

When it will be updated?