WooCommerce Product Price as Sale

  1. Create Card with Card ID : “WooCommerce” (or any) - this card as imaginary customer

  2. Create special Card Type for this Imaginary customer

    image-20240904-062342.png



  3. Link this Card ID in WooCoomerce Upload Task : Parameter ContractCardID

    image-20240903-025639.png

  4. Create Webhook to trigger when contract Activated Or Ended

    *For just Web customers:


    Enabled : Yes
    Custom Mode : Yes
    Fire on Changed : Yes
    Data Type : Contract
    Url : dummy

    Criteria : [Workflow Status.Name] In ('Active', 'Closed') And ([All Customers] = True Or [Card Contracts][[Card.Card ID] = 'WOOCOMMERCECARDID'] Or [Card Type] = 'WOOCOMMERCECARDTYPE')

    Property Changed : WorkflowStatus
    Contents : {FUNCTION:WooCommerceContractUpdateProduct}

    *For Web Customers and All customer in Readysell:

    Criteria :
    [Workflow Status.Name] In ('Active', 'Closed') And ([All Customers] = True Or [Card Contracts][[Card.Card ID] = 'WooCommerce'] Or [Card Type] = 'WC')

  5. Create a contract with this imaginary customer only (OR AllCustomers OR Card Type)
    -- Note: only would be pick up by Webhook if match Card ID or Card Type in Webhook

  6. Add Product and set active contract

  7. Task product upload will update this product

  8. Result in WooCommerce
    a. Before

    c. After

  9. When contract ended, Webhook will trigger and Task will run on schedule to update the product to WooCommerce