• Resolved wpelvis

    (@wpelvis)


    Hi,
    i am wondering the best way to edit fields before syncing to SF.
    I have some data that doesn’t match.
    eg
    1. post_date is in datetime format, and SF needs to have just date.
    2. In Woo orders, we have ‘billing_first_name’ and ‘billing_last_name’ whereas in SF i have ‘primary contact’ so need the 2 fields concatenated.

    Which hook do I use to do this? object_sync_for_salesforce_pull_params_modify?
    Or do I need to make new fields for the WordPress post and send those.

    thanks

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

    (@jonathanstegall)

    @wpelvis if your goal is just to change the data that gets sent from Salesforce into WordPress, you could use object_sync_for_salesforce_pull_params_modify. If you want to change the data that goes from WordPress to Salesforce there are a few more options. You could use object_sync_for_salesforce_wordpress_object_data or object_sync_for_salesforce_push_params_modify, for example.

    We do have a bit of documentation about all the developer hooks at [https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/all-developer-hooks.md](https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/all-developer-hooks.md), which also is in the docs folder when you install the plugin.

    Thread Starter wpelvis

    (@wpelvis)

    Thanks.
    As some were a bit complex (including doing a query on the SF to get IDs) I have created some meta fields on the order items, and put the relevant values in on post creation.
    These then link directly to the SF fields.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @wpelvis I think that is wise. I’ll close this issue for now, then.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘edit fields before sync to SF’ is closed to new replies.