You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Vince Clark <vc...@globalera.com> on 2009/07/21 18:54:10 UTC
importing orders from another system
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
vclark@globalera.com
(303) 493-6723
Re: importing orders from another system
Posted by Vince Clark <vc...@globalera.com>.
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
vclark@globalera.com
(303) 493-6723
----- Original Message -----
From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
To: user@ofbiz.apache.org
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
> vclark@globalera.com
> (303) 493-6723
>
> ----- Original Message -----
> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
> To: user@ofbiz.apache.org
> 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
>> vclark@globalera.com
>> (303) 493-6723
>
Re: importing orders from another system
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
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
> vclark@globalera.com
> (303) 493-6723
>
> ----- Original Message -----
> From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
> To: user@ofbiz.apache.org
> 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
>> vclark@globalera.com
>> (303) 493-6723
>
Re: importing orders from another system
Posted by Vince Clark <vc...@globalera.com>.
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
vclark@globalera.com
(303) 493-6723
----- Original Message -----
From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
To: user@ofbiz.apache.org
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
> vclark@globalera.com
> (303) 493-6723
Re: importing orders from another system
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
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
> vclark@globalera.com
> (303) 493-6723