Contents

requestAddress(for:fields:message:)

Opens a form so that the customer can share the postal address and additionally collect email address and phone number.

Declaration

final func requestAddress(for purpose: CustomerEngagementSession.Purpose? = nil, fields: [CustomerEngagementSession.Field], message: String? = nil) async throws -> CustomerEngagement.Address

Parameters

  • purpose:

    An optional enum of pre-defined purpose of the form, for example .shipping.

  • fields:

    An array of optional contact field types on the form. Only .emailAddress and .phoneNumber types are supported.

  • message:

    A multi-line message text below the title.

Return Value

CustomerEngagement.Address with postal address and contact information shared by the customer.

Discussion

For example, email and phone number can be used for delivery notification.

See Also

Requesting and getting customer information