• Resolved ratputin

    (@ratputin)


    We have a staging site running WooCommerce that we are attempting to sync with Salesforce. We have walked through the setup (excellent documentation BTW) and have data moving back and forth. However the contact are not being added into Salesforce due to the following error:

    Required fields are missing: [LastName]

    Our Fieldmap has the following settings:

    WordPress Object: shop_order
    Salesforce Object: Contact
    Allowed Record Types: Parent & Master
    Default Record Type: Parent
    Date field to trigger pull: Created Date

    WordPress Fields | Salesforce Fields
    _billing_first_name | First Name
    _billing_last_name | Last Name

    Action trigger: WordPress Create

    Any idea what we missed?

    TIA
    KO

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Hi,

    Sure, some things to perhaps look into:

    1. Does it behave differently with asynchronous vs realtime syncing?
    2. Are there any orders that don’t have a value in WordPress for last name that are trying to sync?
    3. Does it work if you map a different WordPress field to Last Name?
    4. If you try to sync the record type “Master” instead (for testing) does the plugin perform differently? (I haven’t worked in a Salesforce install that had that setup yet, so I’m curious)
    5. Has anything changed in the Salesforce configuration since the plugin was set up? It does cache Salesforce data (we don’t yet have a way to automatically clear this, but it clears on its own every 24 hours).
    6. If you change shop_order to user, for example (or another WordPress object type that is part of Core), does it sync successfully?
    7. If #6 is successful, are there other WooCommerce objects you can test with (I am only a little familiar with WooCommerce, but maybe there’s a customer object or something of that nature)?

    Basically, what I would want to find out is:

    1. Is the issue related to WooCommerce? If it is, is it related to a specific WooCommerce object type, or that plugin as a whole?
    2. Is the issue related to Salesforce? If it is, is it related to how your specific setup works, or something more broad?
    3. Is there a core plugin issue? If there is, how can it be replicated in other environments?

    Thread Starter ratputin

    (@ratputin)

    Thanks for the response. I’ll check back in as soon as I have gone through your suggs.

    KO

    Thread Starter ratputin

    (@ratputin)

    1. Does it behave differently with asynchronous vs realtime syncing?
    KO: No.

    2. Are there any orders that don’t have a value in WordPress for last name that are trying to sync?
    KO: No

    3. Does it work if you map a different WordPress field to Last Name?
    KO: Doesn’t appear to.

    4. If you try to sync the record type “Master” instead (for testing) does the plugin perform differently? (I haven’t worked in a Salesforce install that had that setup yet, so I’m curious)
    KO: No

    5. Has anything changed in the Salesforce configuration since the plugin was set up? It does cache Salesforce data (we don’t yet have a way to automatically clear this, but it clears on its own every 24 hours).
    KO: No

    6. If you change shop_order to user, for example (or another WordPress object type that is part of Core), does it sync successfully?
    KO: Yes. I tried a manual push from the user’s dashboard and it went through.

    7. If #6 is successful, are there other WooCommerce objects you can test with (I am only a little familiar with WooCommerce, but maybe there’s a customer object or something of that nature)?
    KO: None seem to work.

    It “looks like” there is an issue with the WooCommerce Object Type. I am stumped. Any other ideas? Would you like access to the test site? I’d be happy to pay for your time.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    I took a quick look at WooCommerce, and I can see why this happens. I’ll take a further look and see what it would take.

    Thread Starter ratputin

    (@ratputin)

    Great! Let me know what you find out.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @ratputin many thanks for submitting this. I believe it raised a bigger bug with post object types and their metadata in general. I also believe I’ve fixed it, as well as your specific WooCommerce order issue, with the update I released a little bit ago. If you update the plugin, my testing indicates that you’ll be able to sync the orders.

    I did notice one thing that I think is unfortunate, but unsure what/if anything to do about it right now: if you try to map a post meta field before it has any data, it will not show up in the field options. That is, if you want to use _billing_first_name on an order, you (presumably) would have to have an order with a value for that already, or the plugin won’t realize it exists. So I do think that’s unfortunate, but because the plugin does rely on the database, it may not be fixable. Certainly not right now.

    In any case, hopefully this fixes your specific issue. Do let us know if it does not.

    Thread Starter ratputin

    (@ratputin)

    Excellent! Quick question…what if we select “Process asynchronously” and schedule “Push to Salesforce” to run every 5 mins or so. Wouldn’t that get around the post meta field data issue?

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @ratputin what issue do you mean? Do you mean the one above where the data field wouldn’t exist if there were no rows with it?

    If that is what you mean – I think that would not affect it. The only place it actually does affect anything is in creating the fieldmap itself, when the dropdown needs to load the meta fields so you can pick them. So the _billing_first_name field doesn’t appear as an option for you to select if there are no orders that have at least a blank value for that field. I assume for your specific case, this is okay because you’ve already mapped the fields, but if you were trying to start from scratch, you’d presumably have to create at least a placeholder order to get access to those fields. Does that make sense?

    But in any case, I generally do recommend that people use push asynchronously; for the sake of the server I think it’s probably a good idea.

    Thread Starter ratputin

    (@ratputin)

    Sorry, I had misunderstood the initial reply. Makes perfect sense. Thanks for the clarification.

    BTW – Everything is working perfectly.

    I really appreciate the help.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Thanks, and I appreciate the revealing of this bug. Cheers.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error: Create Contact (WordPress shop_order with ID of XXXX)’ is closed to new replies.