Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Pardot's API will return a 504 on large requests with certain parameters for the
visitorActivity
endpoint. There's an inactive topic on the Salesforce community boards that suggests changing the request parameters could cause this to be more efficient. https://trailblazers.salesforce.com/answers?id=9063A000000DlRUQA0In testing, sorting by
updated_at
descending proved to be the only consistent option, so this PR adds a stream type to handle that pattern (bookmarking based on tap-trello's implementation).This PR also adds a method to translate existing "id-based" state to the current "updated_at" based state, using a request for the activity object whose ID is bookmarked.
Of note: The API seems to treat datetimes formatted as
YYYY-mm-DD HH:MM:SS
as the user's time zone, and datetimes formatted asYYYY-mm-DDTHH:MM:SSZ
as UTC. A critical part of this PR is to never change the formatting of values so that these types can be mixed effectively for consistency.Manual QA steps
2019-04-12T00:00:00.000000Z
)Risks
Rollback steps