Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add precision to waitlist sync documentation #839

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions docs/deployment_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,34 @@ In order to add, list, or remove certain fields, use the `acoustic.py` command:

See `python ctms/bin/acoustic.py fields --help` for usage details.

### Acoustic Newsletters Fields
For example, in order to synchronize a new waitlist field:

The mapping between the Basket/CTMS newsletter name and the Acoustic field name is controlled by the `acoustic_newsletter_mapping` table in the database.
1. Create the column in the waitlist relational table in Acoustic
2. Add the field using this command in CTMS:
```
ctms/bin/acoustic.py fields add --tablename=waitlist twitter_handle
```

> Note: the list of existing Acoustic fields that will be synchronized is exposed on the [/acoustic_configuration](https://ctms.prod.mozilla-ess.mozit.cloud/acoustic_configuration) endpoint.


### Validate Waitlist Extra Fields

Waitlist subscriptions can receive arbitrary fields. By default, only ``geo`` and ``platform`` are validated (eg. max length).

In order to validate a new waitlist field, the [CTMS codebase has to modified](https://github.com/mozilla-it/ctms-api/blob/ec34e7ca56fe802f78c8b65e01448e134e29b938/ctms/schemas/waitlist.py#L130).


### Acoustic Main Table Newsletters Flags

The mapping between the Basket/CTMS newsletters names and the Acoustic main table fields names is controlled by the `acoustic_newsletter_mapping` table in the database.


In order to add, list, or remove certain mappings, use the `acoustic.py` command.

See `python ctms/bin/acoustic.py newsletter-mappings --help` for usage details.

> **Note**: The usage of this command is not recommended because we are moving away from this column-based approach, and should not onboard new instances.
> **Note**: The usage of this command is not recommended because we are moving away from this flag-based approach, and should not onboard new instances.

### Force resync of contacts

Expand Down
Loading