Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Please reach out to Lopes da Costa, Valentina or another PM to get you access to the API Key in Production or Staging for your brand

...

Info

If we want to set the end date as X seconds after assignment, we need to use the below logic  By default, the assigned offers will have the same rules as the ones configured in Sanity. If you want to override some of these with custom rules, for example, a custom End Date & Start Date, you can pass the following arguments:

Code Block
"ruleParams": {

    "startDate": "{{ "now" | date:"%F" }}",

    "endDate": "{{ "now" | date:'%s' | plus:604800| date:"%F" }}"

  }

In the above example, we set the Start Date to be the time when the Offer was assigned, and we set the End Date to be 7 days after the offer was assigned (now + 604800 seconds).

Note

startDate and endDate are part of the Date Band rule, which always counts from 00:00 to 23:59 from their respective dates.

Note

Be extremely careful and test your webhooks, once an offer is assigned to a user its rules CANNOT be changed from Sanity.

Other resources

...