Skip to content

Commit 1edd75f

Browse files
Revert "Enable passing identifiers to ActionNetwork upsert_person() (#876)
* Revert "Enable passing `identifiers` to ActionNetwork `upsert_person()` (#861)" This reverts commit 77ead60. * Explain why identifiers are not included on ActionNetwork method --------- Co-authored-by: sharinetmc <128429303+sharinetmc@users.noreply.github.com>
1 parent a25943b commit 1edd75f

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

parsons/action_network/action_network.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,18 @@ def upsert_person(
101101
mobile_number=None,
102102
mobile_status="subscribed",
103103
background_processing=False,
104-
identifiers=None,
105104
**kwargs,
106105
):
107106
"""
108107
Creates or updates a person record. In order to update an existing record instead of
109108
creating a new one, you must supply an email or mobile number which matches a record
110109
in the database.
111110
111+
Identifiers are intentionally not included as an option on
112+
this method, because their use can cause buggy behavior if
113+
they are not globally unique. ActionNetwork support strongly
114+
encourages developers not to use custom identifiers.
115+
112116
`Args:`
113117
email_address:
114118
Either email_address or mobile_number are required. Can be any of the following
@@ -155,16 +159,6 @@ def upsert_person(
155159
an immediate success, with an empty JSON body, and send your request to the
156160
background queue for eventual processing.
157161
https://actionnetwork.org/docs/v2/#background-processing
158-
identifiers:
159-
List of strings to be used as globally unique
160-
identifiers. Can be useful for matching contacts back
161-
to other platforms and systems. If the identifier
162-
provided is not globally unique in ActionNetwork, it will
163-
simply be ignored and not added to the object. Action Network
164-
also creates its own identifier for each new resouce.
165-
https://actionnetwork.org/docs/v2/#resources
166-
e.g.: ["foreign_system:1", "other_system:12345abcd"]
167-
168162
**kwargs:
169163
Any additional fields to store about the person. Action Network allows
170164
any custom field.
@@ -229,8 +223,7 @@ def upsert_person(
229223
data["person"]["postal_addresses"] = postal_addresses
230224
if tags is not None:
231225
data["add_tags"] = tags
232-
if identifiers:
233-
data["person"]["identifiers"] = identifiers
226+
234227
data["person"]["custom_fields"] = {**kwargs}
235228
url = f"{self.api_url}/people"
236229
if background_processing:

0 commit comments

Comments
 (0)