async lookupByEmailAddress(params = {}) {
    const { emailAddress, productId } = await validateAsync(Joi.object({
      emailAddress: this.schema.emailAddress.required(),
      productId: this.schema.productId,
    }).required(), params);

    const endpoint = productId
      ? `customer/email/${emailAddress}/productid/${productId}/*`
      : `customer/email/${emailAddress}/*`;

    const response = await this.client.get({ endpoint });
    const customerIds = response.getAsArray('Customers').map((customer) => customer.Id);
    return new ApiSetResponse({ data: customerIds, response });
  }
/**
   * This API provides the ability look up customers using Email Address and an optional Product Id.
   * The response will include a list of customer records including the Customer Id(s)
   * and the Customer Lookup URL(s).
   *
   * @link https://main.omeda.com/knowledge-base/customer-lookup-by-email/
   * @param {object} params
   * @param {string} params.emailAddress The customer's email address.
   * @param {number} [params.productId] An optional product ID.
   * @returns {Promise<ApiSetResponse>} A Set of the found customer IDs.
   */
This API provides the ability look up customers using Email Address and an optional Product Id.
The response will include a list of customer records including the Customer Id(s)
and the Customer Lookup URL(s).


This API provides the ability look up customers using Email Address and an optional Product Id . The response will include a list of customer records including the Customer Id ( s ) and the Customer Lookup URL ( s ) .
async lookupByEmailAddress(params = {}) {
    const { emailAddress, productId } = await validateAsync(Joi.object({
      emailAddress: this.schema.emailAddress.required(),
      productId: this.schema.productId,
    }).required(), params);
    const endpoint = productId
      ? `customer/email/${emailAddress}/productid/${productId}/*`
      : `customer/email/${emailAddress}/*`;
    const response = await this.client.get({ endpoint });
    const customerIds = response.getAsArray('Customers').map((customer) => customer.Id);
    return new ApiSetResponse({ data: customerIds, response });
  }
async lookupByEmailAddress ( params = { } ) { const { emailAddress , productId } = await validateAsync ( Joi . object ( { emailAddress : this . schema . emailAddress . required ( ) , productId : this . schema . productId , } ) . required ( ) , params ) ; const endpoint = productId ? ` ${ emailAddress } ${ productId } ` : ` ${ emailAddress } ` ; const response = await this . client . get ( { endpoint } ) ; const customerIds = response . getAsArray ( 'Customers' ) . map ( ( customer ) => customer . Id ) ; return new ApiSetResponse ( { data : customerIds , response } ) ; }
This API provides the ability look up customers using Email Address and an optional Product Id.
This API provides the ability look up customers using Email Address and an optional Product Id .