Marketplaces / ZZZ Obsolete ones / Tesco UK / Logic for Listing cron

Logic for Listing cron

Sending feed:

  1. Collect all items for listing + items for which iat.deactivate_item = 1
  2. Send them to Tesco
    1. these for listing → with operation 'Create'**set revise_item = 'sent'; set mfo.end_item = 0**
    2. these with iat.deactivate_item = 1 → with operation 'Suspend', set mfo.end_item = 1

For errors during checks for the items (before adding them to the feed) :

a.Save them in revise_item_error if iat.deactivate_item = 0 + set revise_item = error

b.Save them in ending_error if iat.deactivate_item = 1 + set iat.deactivate_item = 0

Reading the response:

Errors:

  1. If mfo.end_item = 1
    1. Save the error in ending_error
    2. set iat.deactivate_item = 0
  2. If mfo.end_item = 0
    1. save the error in revise_item_error
    2. set revise_item =' error'

Successes:

  1. If mfo.end_item = 1
    1. set listingStatus = 'inactive'
    2. set iat.deactivate_item = 0
  2. If mfo.end_item = 0
    1. set revise_item = 'normal'
    2. set update_quantity = 'pending'
    3. set listingStatus = 'active'
    4. set productStatus = 'published'
    5. save SKU as ChannelItemID for each item
Is this article helpful?
0 0 0