Support » Plugin: Object Sync for Salesforce » mapped fields are not showing in log

  • vigneshbabuor

    (@vigneshbabuor)


    Hi Jonathan,

    i am facing a issue on mapping configuration.
    i have mapped a custom post type fields and salesforce custom object fields.
    when i insert a post data, new row is created in post table with custom post type.
    some of field values are synced and some of fields are not syncing with salesforce.

    when i cross check with log post below error log is added
    REQUIRED_FIELD_MISSING error syncing: Create to Salesforce (WordPress bookingordertimeslot with ID of 24138)

    order_name => not synced
    start_date_time => synced
    end_date_time => synced
    order_id => not synced

    is there anything need to configure other than mapping section?
    Thanks
    Vignesh Babu

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Jonathan Stegall

    (@jonathanstegall)

    You need to figure out why the Order__c field is not coming through. You might need to inspect your Salesforce installation and see what it’s called when the REST API sends data. For example it might be Order__c.Id instead.

    Hi @jonathanstegall

    i tried same on PostMan Rest API client, i got a success response.
    url : https://xxx.my.salesforce.com/services/data/v48.0/sobjects/Order_Time_Slot__c

    Body
    {
    “Start_Date_and_Time__c”: “2020-10-10”,
    “End_Date_and_Time__c”: “2020-10-10”,
    “Parent_Order__c”: “8010p000001eBlNAAU”
    }

    Response
    {
    “id”: “a0C0p000000jzL7EAI”,
    “success”: true,
    “errors”: [],
    }

    Plugin Contributor Jonathan Stegall

    (@jonathanstegall)

    Well, Parent_Order__c and Order__c are not the same. You previously indicated that you used Order__c with this plugin.

    If you are using the correct field, though, it’s also possible that you’re trying to create the record in Salesforce before the ID exists. If you create the post in WordPress but the parent order ID is a meta field, the way WordPress works is that the post is created first, and then the meta is created.

    In other words you can’t create a Salesforce record if the required field is a meta field because of how WordPress handles metadata.

    i have change a field name to Parent_Order__c from Order__c.

    i keep Parent_Order__c value is on post_content_filtered WP Post field. there is no metadata for this post.

    Got same response from Salesforce API after mapping updated
    <p>URL: https://cs74.salesforce.com/services/data/v48.0/sobjects/Order_Time_Slot__c</p><p>Message: Required fields are missing: [Parent_Order__c]</p><p>Code: 400

    Plugin Contributor Jonathan Stegall

    (@jonathanstegall)

    Well, it still seems like this field is not being sent to Salesforce. You might want to turn on debug mode. It will create a lot of log entries, but one of them should include the parameters that the plugin is trying to send to Salesforce. Then you can see what is happening to the value.

    I’ve certainly seen this kind of thing work well in the past, although usually I’ve seen that value go into the main post_content field instead. I’m not aware of any reason that the filtered version would not work, but it’s possible that something is happening to it there.

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