Skip to content
Open
Show file tree
Hide file tree
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
17 changes: 12 additions & 5 deletions content/concepts/messages-notifications/messages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,25 @@ marketplace. They can be exchanged freely between a customer and a
provider once they have engaged in a transaction. Messages always need
to be associated with a transaction and can not be sent outside of one.

The default booking and purchase
[transaction processes](https://github.com/sharetribe/example-processes/blob/master/default-booking/process.edn)
The transaction processes
[default-booking](https://github.com/sharetribe/example-processes#default-booking),
[default-purchase](https://github.com/sharetribe/example-processes#default-purchase),
and
[default-download](https://github.com/sharetribe/example-processes#default-download)
include an inquiry transition, which initiates a transaction without
running any [actions](/references/transaction-process-actions/#actions),
allowing the provider and customer to send messages to each other. In
addition, the
[default-inquiry process](https://github.com/sharetribe/example-processes/blob/master/default-inquiry/process.edn)
allowing the provider and customer to send messages to each other.

n addition, the
[default-inquiry process](https://github.com/sharetribe/example-processes#default-inquiry)
initiates a simple transaction that is only intended for messaging.

Note that messages do not alter the transaction or transition it to a
different state.

In all transaction processes, both default and custom, messages can be
sent once the transaction has been initiated with any transition.

## Sending messages

You can send messages using the
Expand Down
12 changes: 6 additions & 6 deletions content/how-to/payments/removing-stripe-and-payments/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ You need to remove at least the following actions:
- `:action/stripe-refund-payment`

If you are using the template default processes with strong customer
authentication (e.g. `default-booking`, `default-purchase`,
`default-negotiation`) you need to remove confirming the payment.
Otherwise, the transaction will get stuck. The simplest way to do this
is to remove `pending-payment` and `expire-payment` states and point
`request-payment` and `request-payment-after-inquiry`, or
authentication (`default-booking`, `default-purchase`,
`default-negotiation`, `default-download`) you need to remove confirming
the payment. Otherwise, the transaction will get stuck. The simplest way
to do this is to remove `pending-payment` and `expire-payment` states
and point `request-payment` and `request-payment-after-inquiry`, or
`request-payment-to-accept-offer`, directly to the following state:

- `preauthorized` in `default-booking`
- `purchased` in `default-purchase`
- `purchased` in `default-purchase` and `default-download`
- `offer-accepted` in `default-negotiation`

When you are building the transaction process for your marketplace, it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ transaction process.
- `default-inquiry`: transaction fields with `showTo: 'customer'` are
collected on CheckoutPageWithInquiryProcess page. Fields with
`showTo: 'provider'` are not collected.
- `default-booking` and `default-purchase`: transaction fields with
`showTo: 'customer'` are collected on CheckoutPageWithPayment. Fields
with `showTo: 'provider'` are not collected.
- `default-booking`, `default-purchase`, and `default-download`:
transaction fields with `showTo: 'customer'` are collected on
CheckoutPageWithPayment. Fields with `showTo: 'provider'` are not
collected.
- `default-negotiation`: transaction fields with `showTo: 'customer'`
are collected on RequestQuotePage, and transaction fields with
`showTo: 'provider'` are collected on the MakeOfferPage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Sharetribe Web Template defines four transaction processes by default:

- daily, nightly, hourly, and fixed bookings use the **default-booking**
process,
- product sales use the **default-purchase** process
- product sales use the **default-purchase** process,
- digital download sales use the **default-download** process,
- price negotiations use the **default-negotiation** process, and
- inquiries use the **default-inquiry** process.

Expand Down Expand Up @@ -118,6 +119,7 @@ and handles these unit types by default:
- **day**, **night**, **hour**, and **fixed** for the
**default-booking** process
- **item** for the **default-purchase** process
- **file** for the **default-download** process
- **inquiry** for the **default-inquiry** process
- **request** and **offer** for the **default-negotiation** process.

Expand Down Expand Up @@ -150,6 +152,7 @@ export const PURCHASE_PROCESS_NAME = 'default-purchase';
export const BOOKING_PROCESS_NAME = 'default-booking';
export const INQUIRY_PROCESS_NAME = 'default-inquiry';
export const NEGOTIATION_PROCESS_NAME = 'default-negotiation';
export const DOWNLOAD_PROCESS_NAME = 'default-download';
// Add new processes with a descriptive name
export const NEGOTIATED_BOOKING_PROCESS_NAME =
'booking-with-negotiation';
Expand Down Expand Up @@ -612,6 +615,7 @@ const tabsForListingType = (processName, listingTypeConfig) => {
['default-purchase']: [DETAILS, PRICING_AND_STOCK, ...deliveryMaybe, ...styleOrPhotosTab],
['default-negotiation']: [DETAILS, ...locationMaybe, ...pricingMaybe, ...styleOrPhotosTab],
['default-inquiry']: [DETAILS, ...locationMaybe, ...pricingMaybe, ...styleOrPhotosTab],
['default-download']: [DETAILS, ...locationMaybe, FILES, ...pricingMaybe, ...styleOrPhotosTab],
};

return tabs[processName] || tabs['default-inquiry'];
Expand Down
5 changes: 3 additions & 2 deletions content/references/digital-files/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ attachment determines the visibility of the file:
- `privateFileAttachments` are visible only to the user who created the
resource.

The [API reference](https://www.sharetribe.com/api-reference/) details
which resources have which scopes of file attachments available.
The
[API reference for supported attaching resources](https://www.sharetribe.com/api-reference/marketplace.html#supported-attaching-resources)
details which resources have which scopes of file attachments available.

## Further reading

Expand Down
18 changes: 18 additions & 0 deletions content/references/transaction-process-actions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,24 @@ requires that the transition is made from a trusted context.

**Configuration options**: -

### Files

#### :action/reveal-listing-protected-files

Copy protected file attachments from the transaction's listing to the
transaction itself.

When the action runs during a transition, it reads all non-deleted
fileAttachment entities with :fileAttachment.scope/protected on the
transaction's listing and creates matching fileAttachment entities
attached to the transaction.

**Preconditions**: -

**Parameters**: -

**Configuration options**: -

### Stripe integration

#### `:action/stripe-create-payment-intent`
Expand Down
7 changes: 4 additions & 3 deletions content/template/payments/save-payment-card/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ payment). In the default-booking process, a preauthorization is created:
the money is reserved, but not yet moved to Stripe. When a provider
accepts the request, the preauthorization is captured (i.e. the payment
is charged from the card and money moved to Stripe and held on the
connected account of the provider until payout). In the default-purchase
and default-negotiation processes, the payment is created and captured
immediately. The actual payout happens when the transaction completes.
connected account of the provider until payout). In the
**default-purchase**, **default-download** and **default-negotiation**
processes, the payment is created and captured immediately. The actual
payout happens when the transaction completes.

A payment card also needs to be saved for off-session payments if those
are in use. They are automatic one-time payments that happen when the
Expand Down
10 changes: 10 additions & 0 deletions content/tutorial/create-transaction-process/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ Let's first import the new process and export its name as a constant.
import * as bookingProcess from './transactionProcessBooking';
import * as inquiryProcess from './transactionProcessInquiry';
import * as negotiationProcess from './transactionProcessNegotiation';
import * as downloadProcess from './transactionProcessDownload';
+ import * as instantProcess from './transactionProcessInstantBooking';

export const ITEM = 'item';
Expand All @@ -514,13 +515,15 @@ Let's first import the new process and export its name as a constant.
export const INQUIRY = 'inquiry';
export const OFFER = 'offer'; // The unitType 'offer' means that provider created the listing on default-negotiation process
export const REQUEST = 'request'; // The unitType 'request' means that customer created the listing on default-negotiation process
export const FILE = 'file';


// Then names of supported processes
export const PURCHASE_PROCESS_NAME = 'default-purchase';
export const BOOKING_PROCESS_NAME = 'default-booking';
export const INQUIRY_PROCESS_NAME = 'default-inquiry';
export const NEGOTIATION_PROCESS_NAME = 'default-negotiation';
export const DOWNLOAD_PROCESS_NAME = 'default-download';
+ export const INSTANT_PROCESS_NAME = 'biketribe-instant-booking';

```
Expand Down Expand Up @@ -557,6 +560,12 @@ const PROCESSES = [
process: negotiationProcess,
unitTypes: [OFFER, REQUEST],
},
{
name: DOWNLOAD_PROCESS_NAME,
alias: `${DOWNLOAD_PROCESS_NAME}/release-1`,
process: downloadProcess,
unitTypes: [FILE],
},
+ {
+ name: INSTANT_PROCESS_NAME,
+ alias: `${INSTANT_PROCESS_NAME}/release-1`,
Expand Down Expand Up @@ -623,6 +632,7 @@ import {
INQUIRY_PROCESS_NAME,
PURCHASE_PROCESS_NAME,
NEGOTIATION_PROCESS_NAME,
TODO,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a TODO here since this article still needs to be updated with the InboxPage.stateData.js code examples

resolveLatestProcessName,
getProcess,
} from '../../transactions/transaction';
Expand Down