migueesc123 / WooCommerceConnector

A Power BI Custom Connector for WooCommerce
MIT License
31 stars 12 forks source link

Connector does not pull all data from woocommerce #9

Closed jesperkindt closed 5 years ago

jesperkindt commented 5 years ago

Not all data is pulled. I miss data from the other sections like fee line and order shipping.

migueesc123 commented 5 years ago

hey! are you able to replicate the issue with our the test environment provided from this repo? I do see that those fields are loading on my end: image image and I can't repro your situation

jesperkindt commented 5 years ago

Hi Miguel

I think I actually got the fields I mentioned but they have no data - just the "List" in the field. Looks like it is some kind of array, but I am new to powerBI and do not know if the data is hidden somewhere behind the list.

Still I miss other fields like "postcode" (from the order shipping) and others. Is there a way that I can add the fields I need myself?

Kind regards, Jesper

On Fri, Apr 26, 2019 at 8:29 PM Miguel Escobar notifications@github.com wrote:

hey! are you able to replicate the issue with our the test environment provided from this repo? I do see that those fields are loading on my end: [image: image] https://user-images.githubusercontent.com/9544580/56828540-21b47a80-6827-11e9-9156-d7ccf0f0888e.png [image: image] https://user-images.githubusercontent.com/9544580/56828595-40b30c80-6827-11e9-9464-846601b614dd.png and I can't repro your situation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-487156627, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5UKUJ35EEO6HP2RPKUWOLPSNCYBANCNFSM4HIWNJWQ .

migueesc123 commented 5 years ago

The Custom Connector gets all of the data from the orders endpoint. Here's the full documentation about that endpoint: https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-orders You can expand those columns that have the Billing and shipping information to get the fields that you want. It's basically the icon right next to the column name. As you can see from one of the previous images, you can absolutely get the postcode for the shipping information

jesperkindt commented 5 years ago

Hi again

I figured it out. Just needed to expand the lists. I think that I am missing the fees because I am using "Stripe" for payment and maybe the field names from stripe are special.... do you happen to know where the find those?

On Fri, Apr 26, 2019 at 8:29 PM Miguel Escobar notifications@github.com wrote:

hey! are you able to replicate the issue with our the test environment provided from this repo? I do see that those fields are loading on my end: [image: image] https://user-images.githubusercontent.com/9544580/56828540-21b47a80-6827-11e9-9156-d7ccf0f0888e.png [image: image] https://user-images.githubusercontent.com/9544580/56828595-40b30c80-6827-11e9-9464-846601b614dd.png and I can't repro your situation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-487156627, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5UKUJ35EEO6HP2RPKUWOLPSNCYBANCNFSM4HIWNJWQ .

migueesc123 commented 5 years ago

check the first image from my first reply. There's a "fee_lines" field that the API gives us. Again, you can read the full documentation of the API from the WooCommerce site. Here's the one for the fee_lines field: https://woocommerce.github.io/woocommerce-rest-api-docs/#order-fee-lines-properties

jesperkindt commented 5 years ago

When I expand the fee_lines I get null values...

On Sat, Apr 27, 2019 at 12:46 PM Miguel Escobar notifications@github.com wrote:

check the first image from my first reply. There's a "fee_lines" field that the API gives us. Again, you can read the full documentation of the API from the WooCommerce site. Here's the one for the fee_lines field:

https://woocommerce.github.io/woocommerce-rest-api-docs/#order-fee-lines-properties

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-487275457, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5UKUKB6O6H6OECULTVJKDPSQVHPANCNFSM4HIWNJWQ .

migueesc123 commented 5 years ago

If you're expecting other results, as in the API is not providing the correct values, then I'd highly encourage you to get in contact with your WooCommerce developer to check what might be causing the issue and if your WooCommerce plug in is set up correctly or if there are other issues that are causing conflicts with the behavior of the API. If you use stripe, then you might want to check where Stripe stores the "stripe fee" at the order level. Perhaps its part of the meta data field.

jesperkindt commented 5 years ago

Found it in the meta data field. I really appreciate your help. Have a very nice day.

On Sat, Apr 27, 2019 at 1:50 PM Miguel Escobar notifications@github.com wrote:

If you're expecting other results, as in the API is not providing the correct values, then I'd highly encourage you to get in contact with your WooCommerce developer to check what might be causing the issue and if your WooCommerce plug in is set up correctly or if there are other issues that are causing conflicts with the behavior of the API. If you use stripe, then you might want to check where Stripe stores the "stripe fee" at the order level. Perhaps its part of the meta data field.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-487279479, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5UKUNUO24PVJQUMLFQSLTPSQ4YBANCNFSM4HIWNJWQ .

jesperkindt commented 4 years ago

Hi Migueesc

Are the customer email adresses not included in the connection? Could not find them anywere.

Kind regards, Jesper

fre. 26. apr. 2019 kl. 20.29 skrev Miguel Escobar <notifications@github.com

:

hey! are you able to replicate the issue with our the test environment provided from this repo?

I do see that those fields are loading on my end:

[image: image] https://user-images.githubusercontent.com/9544580/56828540-21b47a80-6827-11e9-9156-d7ccf0f0888e.png

[image: image] https://user-images.githubusercontent.com/9544580/56828595-40b30c80-6827-11e9-9464-846601b614dd.png

and I can't repro your situation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-487156627, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5UKUJ35EEO6HP2RPKUWOLPSNCYBANCNFSM4HIWNJWQ .

migueesc123 commented 4 years ago

Hey @jesperkindt

You can check the full documentation of the API and the fields that you should be getting from the link below: https://woocommerce.github.io/woocommerce-rest-api-docs/#order-properties

You'd need to check your version of WooCommerce just to make sure which fields you should be receiving.

The connector basically picks the most standard fields and just shows them to you. It's basically the following line of code: https://github.com/migueesc123/WooCommerceConnector/blob/c1046d797b56ae3914a779689a8c9be3105a52d7/Woocommerce/Woocommerce.pq#L94

If you require any other fields which might be specific to your custom installation of WooCommerce, then you might need to modify the code of the connector.

jesperkindt commented 4 years ago

The email address is in the customers list/table and not the orders list/table. If I could connect to the customers table I can make the needed relation in powerBI.

Can you help me how to connect to customers table?

lør. 5. sep. 2020 kl. 04.10 skrev Miguel Escobar notifications@github.com:

Hey @jesperkindt https://github.com/jesperkindt

You can check the full documentation of the API and the fields that you should be getting from the link below:

https://woocommerce.github.io/woocommerce-rest-api-docs/#order-properties

You'd need to check your version of WooCommerce just to make sure which fields you should be receiving.

The connector basically picks the most standard fields and just shows them to you. It's basically the following line of code:

https://github.com/migueesc123/WooCommerceConnector/blob/c1046d797b56ae3914a779689a8c9be3105a52d7/Woocommerce/Woocommerce.pq#L94

If you require any other fields which might be specific to your custom installation of WooCommerce, then you might need to modify the code of the connector.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-687522872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL5UKUKLEMN4EJCW22K3ISTSEGMZJANCNFSM4HIWNJWQ .

gijsvanbeek commented 4 years ago

@jesperkindt you can find an edited version of the comnector in the other closed issue. I expanded the connector last year with the possibility to connect the customer table. You can make a relation between order table - customerid and customer table id and then you can get alle the info together

migueesc123 commented 4 years ago

That is incorrect @jesperkindt

For an environment where you disable guest checkout that might be true, but for the default scenarios a customer is not created (nor necessary) if guest checkout is enabled.

The “billing” information related to the order is displayed inside the Orders endpoint available in this connector. Within that structured value (which you need to expand) you can get the billing name, billing email address and even the billing address if you have that enabled.

If you wish to retrieve a list of your users with the WooCommerce role of “customer” then that’s something that I haven’t implemented in the connector, but you will be missing all of your customers that chose to do a guest checkout. Not to mention that you could have an user with the role “customer” but it has no orders under its name.

Hope this helps in understanding how the data is structured inside of WooCommerce. I highly recommend checking the API documentation.

jesperkindt commented 4 years ago

Thank you - I found it inside the billing. Great help :-)

tir. 8. sep. 2020 kl. 21.30 skrev Miguel Escobar notifications@github.com:

That is incorrect @jesperkindt https://github.com/jesperkindt

For an environment where you disable guest checkout that might be true, but for the default scenarios a customer is not created (nor necessary) if guest checkout is enabled.

The “billing” information related to the order is displayed inside the Orders endpoint available in this connector. Within that structured value (which you need to expand) you can get the billing name, billing email address and even the billing address if you have that enabled.

If you wish to retrieve a list of your users with the WooCommerce role of “customer” then that’s something that I haven’t implemented in the connector, but you will be missing all of your customers that chose to do a guest checkout. Not to mention that you could have an user with the role “customer” but it has no orders under its name.

Hope this helps in understanding how the data is structured inside of WooCommerce. I highly recommend checking the API documentation.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-689088805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL5UKULJ5GYABFWXCUCOQQLSE2A5TANCNFSM4HIWNJWQ .

jesperkindt commented 5 months ago

Dear Migueesc,

It has been a while since I last updated my powerBI report using your woo.commerce custom connector. Now I get this error message: "Expression.Error: The name 'WooCommerce.Contents' wasn't recognized. Make sure it's spelled correctly."

The *.mez file is located here: C:\Users\JEKLA\Documents\Microsoft Power BI Desktop\Custom Connectors

Did something change in the last year or so?

Kind regards, Jesper

On Tue, Sep 1, 2020 at 12:19 PM Jesper Kindt Larsen @.***> wrote:

Hi Migueesc

Are the customer email adresses not included in the connection? Could not find them anywere.

Kind regards, Jesper

fre. 26. apr. 2019 kl. 20.29 skrev Miguel Escobar < @.***>:

hey! are you able to replicate the issue with our the test environment provided from this repo?

I do see that those fields are loading on my end:

[image: image] https://user-images.githubusercontent.com/9544580/56828540-21b47a80-6827-11e9-9156-d7ccf0f0888e.png

[image: image] https://user-images.githubusercontent.com/9544580/56828595-40b30c80-6827-11e9-9464-846601b614dd.png

and I can't repro your situation

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/migueesc123/WooCommerceConnector/issues/9#issuecomment-487156627, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5UKUJ35EEO6HP2RPKUWOLPSNCYBANCNFSM4HIWNJWQ .