Skip to content

Pull and push: mapping object is currently pulling, so we do not push it #516

@amp42

Description

@amp42

Goal
In SF capture the date/time when the corresponding WP record was created by this plugin in WP

Describe the bug
WP to SF push fails when the record is created in WP via a pull from SF by this plugin

To Reproduce

  1. WP: create a custom post type contact. WP Contact is shorthand (name) for the entity that is the post with this custom type.
  • Field: record_id
  1. SF > Contact object: Create a custom DateTime field, call it Created in WP
  2. Map SF Contact to to WP Contact
  • Pull from SF based on SystemModStamp

  • WP Field: record_id : SF Field: Id

    • Prematch: yes
    • Salesforce key: yes
    • Direction: SF to WP
  • WP Field: post_date: SF Field: Created in WP

    • Direction: WP to SF
  • Action Triggers

    • WP Create
    • SF Create
    • SF Update
    • SF Delete
  • Process Asynchronously: selected

Expected behavior
When a Contact record is created in SF, it's created in WP via pull by the plugin. This works.
When the WP Contact is created, push the post_date over to SF using the record ID to upsert the field.

Observed behavior
The log in debug mode has the following three statements with roughly the same timestamp:

  1. Debug: Start to add Salesforce ID <...> to the queue
  2. Debug: Salesforce ID <...> has been successfully pulled into the queue.
  3. Debug: mapping object transient ID <...> is currently pulling, so we do not push it

Environment (please complete the following information):

  • WordPress Version: 6.1.1
  • ObjectSync: 2.2.4
  • PHP Version [e.g. 7.1]

Additional context
If I remove the pull operation from happening at the same time on the same record, the push works. It's only when pull is creating the record in WP and push back to SF is triggered at roughly the same time, the push doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedOther developer help would be great

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions