fbpx

Home Forums Booster Plus Customer Forum Product Input fields in webhooks order data

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #47735
    Len Woffindin
    Participant

    I need to export order data to google sheets using a webhook, the basic order data exports well.
    I need to include the data from the product input fields added by Booster.
    Have tried this in the google sheet apps scripts, but cant get it to work.

    function doPost(e) {
    var myData = JSON.parse([e.postData.contents]);
    var product_f1 = myData._wcj_product_input_fields_local_1;

    How do I include the Booster data in the webhook feed?
    Thanks

    #47736
    David G
    Participant

    Hello @lcwoffindin ,

    Thanks for reaching out to us.

    Could you please confirm that you are receiving booster data in the “myData” variable?

    #47825
    Len Woffindin
    Participant

    I cant tell what’s in that variable, I am struggling to work out how to see what data fields are in it.
    I guessed at “myData._wcj_product_input_fields_local_1”, but I get nothing.
    Would the function below with doPost(e) contain Booster data? WIs that expected or not please, or is something else required in WordPress/Woocommerce to include it.

    function doPost(e) {
    var myData = JSON.parse([e.postData.contents]);

    LenW

    #47893
    Len Woffindin
    Participant

    I now have it working. I bought the Pro version of the Google Connector and it allows selection of additional fields.
    Is there a way to copy fields to another product, so that the field names in the export will remain the same, or should I use global field?

    #48141
    David G
    Participant

    Hello @lcwoffindin ,

    The same key “_wcj_product_input_fields_local_1” will work for the other products. No need to change the key for each product.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.