Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Dec 31, 2024

  • Implemented postprocess_record method in ContactsSink to create actions based on email and page_name configuration.
  • Added page_name property to TargetActionKit for enhanced configuration options.

- Implemented postprocess_record method in ContactsSink to create actions based on email and page_name configuration.
- Added page_name property to TargetActionKit for enhanced configuration options.
@ghost ghost requested review from arilton, brenhogan, hsyyid and keyn4 December 31, 2024 14:24
@ghost ghost self-assigned this Dec 31, 2024
- Changed the API endpoint for ContactsSink from "user" to "rest/v1/".
- Added temporary handling for zip code errors by removing the "zip" field from the record.
- Integrated postprocessing of records after successful updates and action creations.
- Improved error logging for action creation failures, providing clearer feedback on issues.

These changes aim to improve the robustness and clarity of the ContactsSink functionality.
@ghost ghost marked this pull request as ready for review December 31, 2024 18:41

name = "Contacts"
endpoint = "user"
endpoint = "rest/v1/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentional?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Without it I would not be able to add users to the action page

user_id = existing_users[0].get("id")
# TODO:I got {"errors": {"zip": ["Data too long! Please use a smaller value, see the schema for the maximum allowed input"]}}}
# I'm not sure if this is the correct way to handle this, but it's a temporary fix
record.pop("zip", None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this just mean you were providing an invalid zip?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a valid one and in the schema there wasn't any valuable information on how to handle it... If I let it updating the zip it would break things.

@ghost ghost requested a review from hsyyid December 31, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants