Giter Site home page Giter Site logo

Comments (1)

hatzopoulos avatar hatzopoulos commented on July 18, 2024

In my case, I have noticed that error code 3 (Invalid prospect ID) will be returned by calls to /api/email/version/3/do/send/prospect_email/ when the prospect exists but has opted_out of receiving email. Rather then saying it failed because of an opt out situation.

Without checking if the prospect is existing and opted in first it can can lead to less then optimal code or logic being designed where one could think the prospect doesn't exist and try to create it but then that would lead to error 9. Example:

  1. send one to one email api/email/version/3/do/send/prospect_email/[email protected]?params
  2. caught response: Invalid prospect ID (strange because you would expect Invalid prospect Email)
  3. ok so send request to create new prospect: api/prospect/version/3/do/create/email/<email>
  4. caught response: Error (9): A prospect with the specified email address already exists

After checking the prospect using api/prospect/version/3/do/read/email you may find..
recent_interaction => Opted Out
is_do_not_email => 1
opted_out => 1

It would be helpful if the opt out reason was returned possibly as a new error code.

from api-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.