• Resolved maven1129

    (@maven1129)


    The use case is to create a customer portal of sorts to pull in orders and contact info from SF, and build a page that displays the posts and data in Elementor. I think this will work, and I’ve got as far as getting SF objects created as a custom post type.

    However, when I create a contact in SF to creates an object/post in WP, but, it creates them as drafts. Is there any reason that’s the default, or any setting I am missing?

    I read comments to a forum post here that says you could accomplish this with a developer hook, or to create a SF field to map to publish status of the object/post.

    Are these the only methods, or is there a setting somewhere?

    If these are the only methods, could you point me to where I set that developer hook mentioned (how to deploy that setting), or even how to have that setting be shown in the mapping as an option using this hook?

    Finally, if anyone has ideas or examples on how they’ve used this tool to create a customer portal, I’d love to explorer that and get your feedback or advice!

    Thanks!

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

    (@jonathanstegall)

    Yes, the developer hook and adding a field are the only current ways to do this. In the next major release I think there’ll be a new setting that can do it as well, but I’m not sure when that’ll be coming.

    To use the developer hook, I made a basic gist of how to use it that you can see here. You’d want to use that in a plugin of your own, or in your theme. You would probably want to expand it a bit to make sure it only applied to your chosen post types. So there’s a bit of development work for you to do, if you follow that method. It’s not necessarily a copy/paste situation here, but if you’re comfortable with WordPress development it’s manageable.

    As for how to add a field in the fieldmap, you’d basically want to add a field to Salesforce and call it post status, or something of that nature. Then you’d want to map it to the “post_status” field of your WordPress post object. In Salesforce you’d give it a value of “publish” and then the posts in WordPress would have the “publish” status.

    Thread Starter maven1129

    (@maven1129)

    Thanks for the rapid support here. Is there a reason for the use_soap parameter for the linked function?

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    In your case, no. There might be scenarios where a developer would want to modify whether to use the SOAP library rather than the REST API, but not for something like this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Auto set new objects created SF–>WP as Published’ is closed to new replies.