importing orders from another system

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

importing orders from another system

Vince Clark
I am building an import that connects to another system and imports orders on a daily basis. Payment processing and shipping is handled in the other system so I just need to create the order, a payment, and then ship the order to update inventory and accounting in OFBiz.

I am not sure the best way to handle the payment. I was thinking of creating an OrderPaymentPreference with paymentMethodTypeId = EXT_OFFLINE. There is a service (createPaymentFromPreference) that will then create the payment, although it doesn't seem to complete the proess of actually receiving the payment against the order.

Am I going down the wrong path here?


Vince Clark
[hidden email]
(303) 493-6723
Reply | Threaded
Open this post in threaded view
|

Re: importing orders from another system

BJ Freeman
I read in the order info make a map then call the cart
to create the order.
usually my orders also include the payment information Like CC and
authorization as well as AVS return.
so I put those through payment services in accounting.
they have made some changes in he last week so not sure if everything is
the same.


Vince Clark sent the following on 7/21/2009 9:54 AM:

> I am building an import that connects to another system and imports orders on a daily basis. Payment processing and shipping is handled in the other system so I just need to create the order, a payment, and then ship the order to update inventory and accounting in OFBiz.
>
> I am not sure the best way to handle the payment. I was thinking of creating an OrderPaymentPreference with paymentMethodTypeId = EXT_OFFLINE. There is a service (createPaymentFromPreference) that will then create the payment, although it doesn't seem to complete the proess of actually receiving the payment against the order.
>
> Am I going down the wrong path here?
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723
>

--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.

Reply | Threaded
Open this post in threaded view
|

Re: importing orders from another system

Jacopo Cappellato-4
In reply to this post by Vince Clark
Hi Vince,

if you create the payment for the order before the invoice, when the  
invoice is created the payment should be applied to it.

Jacopo

On Jul 21, 2009, at 6:54 PM, Vince Clark wrote:

> I am building an import that connects to another system and imports  
> orders on a daily basis. Payment processing and shipping is handled  
> in the other system so I just need to create the order, a payment,  
> and then ship the order to update inventory and accounting in OFBiz.
>
> I am not sure the best way to handle the payment. I was thinking of  
> creating an OrderPaymentPreference with paymentMethodTypeId =  
> EXT_OFFLINE. There is a service (createPaymentFromPreference) that  
> will then create the payment, although it doesn't seem to complete  
> the proess of actually receiving the payment against the order.
>
> Am I going down the wrong path here?
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723

Reply | Threaded
Open this post in threaded view
|

Re: importing orders from another system

Vince Clark
Yes that is what I am doing. I am not using a cart, rather I am calling a series of simple methods.
First I prep the data and call storeOrder to create the order in OFBiz. The service also creates an OrderPaymentPreference record of type EXT_OFFLINE (I am passing this in a map to storeOrder.)
Then I call changeOrderStatus to change the order from created to approved.
Then I call createPaymentFromPreference which successfully creates a payment record.
The last service I call is processOrderPayments.
I still need to figure out how to generate the invoice and appy payments.

There is probably an easier way to do this. Right now I have to call all of these services with require-new-transaction="true" so that records are committed to the database before the next service is called.


Vince Clark
[hidden email]
(303) 493-6723

----- Original Message -----
From: "Jacopo Cappellato" <[hidden email]>
To: [hidden email]
Sent: Wednesday, July 22, 2009 2:20:47 AM GMT -07:00 US/Canada Mountain
Subject: Re: importing orders from another system

Hi Vince,

if you create the payment for the order before the invoice, when the  
invoice is created the payment should be applied to it.

Jacopo

On Jul 21, 2009, at 6:54 PM, Vince Clark wrote:

> I am building an import that connects to another system and imports  
> orders on a daily basis. Payment processing and shipping is handled  
> in the other system so I just need to create the order, a payment,  
> and then ship the order to update inventory and accounting in OFBiz.
>
> I am not sure the best way to handle the payment. I was thinking of  
> creating an OrderPaymentPreference with paymentMethodTypeId =  
> EXT_OFFLINE. There is a service (createPaymentFromPreference) that  
> will then create the payment, although it doesn't seem to complete  
> the proess of actually receiving the payment against the order.
>
> Am I going down the wrong path here?
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723

Reply | Threaded
Open this post in threaded view
|

Re: importing orders from another system

Jacopo Cappellato-4

On Jul 22, 2009, at 4:29 PM, Vince Clark wrote:

> Yes that is what I am doing. I am not using a cart, rather I am  
> calling a series of simple methods.
> First I prep the data and call storeOrder to create the order in  
> OFBiz. The service also creates an OrderPaymentPreference record of  
> type EXT_OFFLINE (I am passing this in a map to storeOrder.)
> Then I call changeOrderStatus to change the order from created to  
> approved.
> Then I call createPaymentFromPreference which successfully creates a  
> payment record.
> The last service I call is processOrderPayments.
> I still need to figure out how to generate the invoice and appy  
> payments.
>

Invoices are created based on shipment status changes (picked, or  
packed in the release branch).

> There is probably an easier way to do this. Right now I have to call  
> all of these services with require-new-transaction="true" so that  
> records are committed to the database before the next service is  
> called.
>

You may want to have a look at the "quick ship" link in the order  
detail page and all the events that are triggered by this.

Jacopo

>
> Vince Clark
> [hidden email]
> (303) 493-6723
>
> ----- Original Message -----
> From: "Jacopo Cappellato" <[hidden email]>
> To: [hidden email]
> Sent: Wednesday, July 22, 2009 2:20:47 AM GMT -07:00 US/Canada  
> Mountain
> Subject: Re: importing orders from another system
>
> Hi Vince,
>
> if you create the payment for the order before the invoice, when the
> invoice is created the payment should be applied to it.
>
> Jacopo
>
> On Jul 21, 2009, at 6:54 PM, Vince Clark wrote:
>
>> I am building an import that connects to another system and imports
>> orders on a daily basis. Payment processing and shipping is handled
>> in the other system so I just need to create the order, a payment,
>> and then ship the order to update inventory and accounting in OFBiz.
>>
>> I am not sure the best way to handle the payment. I was thinking of
>> creating an OrderPaymentPreference with paymentMethodTypeId =
>> EXT_OFFLINE. There is a service (createPaymentFromPreference) that
>> will then create the payment, although it doesn't seem to complete
>> the proess of actually receiving the payment against the order.
>>
>> Am I going down the wrong path here?
>>
>>
>> Vince Clark
>> [hidden email]
>> (303) 493-6723
>

Reply | Threaded
Open this post in threaded view
|

Re: importing orders from another system

Vince Clark
That is what I'm planning on doing. Basically go thru the same process as "Quick Ship Entire Order." I am making some assumptions:
1) Order must be in Approved status
2) Payment and OrderPaymentPreference must exist
3) Quick Ship Entire Order will generate the shipment, invoice, and apply the payment


Vince Clark
[hidden email]
(303) 493-6723

----- Original Message -----
From: "Jacopo Cappellato" <[hidden email]>
To: [hidden email]
Sent: Wednesday, July 22, 2009 8:54:30 AM GMT -07:00 US/Canada Mountain
Subject: Re: importing orders from another system


On Jul 22, 2009, at 4:29 PM, Vince Clark wrote:

> Yes that is what I am doing. I am not using a cart, rather I am  
> calling a series of simple methods.
> First I prep the data and call storeOrder to create the order in  
> OFBiz. The service also creates an OrderPaymentPreference record of  
> type EXT_OFFLINE (I am passing this in a map to storeOrder.)
> Then I call changeOrderStatus to change the order from created to  
> approved.
> Then I call createPaymentFromPreference which successfully creates a  
> payment record.
> The last service I call is processOrderPayments.
> I still need to figure out how to generate the invoice and appy  
> payments.
>

Invoices are created based on shipment status changes (picked, or  
packed in the release branch).

> There is probably an easier way to do this. Right now I have to call  
> all of these services with require-new-transaction="true" so that  
> records are committed to the database before the next service is  
> called.
>

You may want to have a look at the "quick ship" link in the order  
detail page and all the events that are triggered by this.

Jacopo

>
> Vince Clark
> [hidden email]
> (303) 493-6723
>
> ----- Original Message -----
> From: "Jacopo Cappellato" <[hidden email]>
> To: [hidden email]
> Sent: Wednesday, July 22, 2009 2:20:47 AM GMT -07:00 US/Canada  
> Mountain
> Subject: Re: importing orders from another system
>
> Hi Vince,
>
> if you create the payment for the order before the invoice, when the
> invoice is created the payment should be applied to it.
>
> Jacopo
>
> On Jul 21, 2009, at 6:54 PM, Vince Clark wrote:
>
>> I am building an import that connects to another system and imports
>> orders on a daily basis. Payment processing and shipping is handled
>> in the other system so I just need to create the order, a payment,
>> and then ship the order to update inventory and accounting in OFBiz.
>>
>> I am not sure the best way to handle the payment. I was thinking of
>> creating an OrderPaymentPreference with paymentMethodTypeId =
>> EXT_OFFLINE. There is a service (createPaymentFromPreference) that
>> will then create the payment, although it doesn't seem to complete
>> the proess of actually receiving the payment against the order.
>>
>> Am I going down the wrong path here?
>>
>>
>> Vince Clark
>> [hidden email]
>> (303) 493-6723
>

Reply | Threaded
Open this post in threaded view
|

Re: importing orders from another system

Vince Clark
In reply to this post by Vince Clark
BJ - are you doing this in Java? I am trying to find a way to use simple methods to read in order data from the remote system and create a shopping cart. All the services available for creating a shopping cart seem to depend on a quote or order already existing in the system. I suppose I could create the order and then create a cart from the order so I can use the services available to the shopping cart.

I've been using the "storeOrder" service and almost got it done that way. But I just realized there is not a list in this service for orderItemShipGroupAssoc.


Vince Clark
[hidden email]
(303) 493-6723

----- Original Message -----
From: "BJ Freeman" <[hidden email]>
To: [hidden email]
Sent: Tuesday, July 21, 2009 1:29:21 PM GMT -07:00 US/Canada Mountain
Subject: Re: importing orders from another system

I read in the order info make a map then call the cart
to create the order.
usually my orders also include the payment information Like CC and
authorization as well as AVS return.
so I put those through payment services in accounting.
they have made some changes in he last week so not sure if everything is
the same.


Vince Clark sent the following on 7/21/2009 9:54 AM:

> I am building an import that connects to another system and imports orders on a daily basis. Payment processing and shipping is handled in the other system so I just need to create the order, a payment, and then ship the order to update inventory and accounting in OFBiz.
>
> I am not sure the best way to handle the payment. I was thinking of creating an OrderPaymentPreference with paymentMethodTypeId = EXT_OFFLINE. There is a service (createPaymentFromPreference) that will then create the payment, although it doesn't seem to complete the proess of actually receiving the payment against the order.
>
> Am I going down the wrong path here?
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723
>

--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.

Reply | Threaded
Open this post in threaded view
|

Re: importing orders from another system

BJ Freeman
In reply to this post by Vince Clark
I do it both ways:
for real time I use java to field the event and and save data to be read
later.
then I have a java service that reads he data through the datafile
component and calls services. I do this because there are problems with
the data I am importing like the money has a $ sign that needs to be
taken out, as an example.
in my example that I have been working on it is all simple method.
http://docs.ofbiz.org/display/OFBIZ/Handling+of+External+data
the example is not complete but gives the general IDea.

Vince Clark sent the following on 7/23/2009 7:50 PM:

> BJ - are you doing this in Java? I am trying to find a way to use simple methods to read in order data from the remote system and create a shopping cart. All the services available for creating a shopping cart seem to depend on a quote or order already existing in the system. I suppose I could create the order and then create a cart from the order so I can use the services available to the shopping cart.
>
> I've been using the "storeOrder" service and almost got it done that way. But I just realized there is not a list in this service for orderItemShipGroupAssoc.
>
>
> Vince Clark
> [hidden email]
> (303) 493-6723
>
> ----- Original Message -----
> From: "BJ Freeman" <[hidden email]>
> To: [hidden email]
> Sent: Tuesday, July 21, 2009 1:29:21 PM GMT -07:00 US/Canada Mountain
> Subject: Re: importing orders from another system
>
> I read in the order info make a map then call the cart
> to create the order.
> usually my orders also include the payment information Like CC and
> authorization as well as AVS return.
> so I put those through payment services in accounting.
> they have made some changes in he last week so not sure if everything is
> the same.
>
>
> Vince Clark sent the following on 7/21/2009 9:54 AM:
>> I am building an import that connects to another system and imports orders on a daily basis. Payment processing and shipping is handled in the other system so I just need to create the order, a payment, and then ship the order to update inventory and accounting in OFBiz.
>>
>> I am not sure the best way to handle the payment. I was thinking of creating an OrderPaymentPreference with paymentMethodTypeId = EXT_OFFLINE. There is a service (createPaymentFromPreference) that will then create the payment, although it doesn't seem to complete the proess of actually receiving the payment against the order.
>>
>> Am I going down the wrong path here?
>>
>>
>> Vince Clark
>> [hidden email]
>> (303) 493-6723
>>
>

--
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.