# Segment Replace
source: https://developer.mastercard.com/benefit-allocation-service-mtls/documentation/use-cases/replace_segment/index.md

#### Overview {#overview}

Replaces the existing benefits with the new set of benefits that are on the new segment by taking a card number, old segment, new segment and effective date in the input. The existing benefits are expired, and new benefits are assigned with the effective date. The response is an array of bundles that are newly assigned to the card. The benefit allocation replace segment service can

* Replace a segment associated with a card.
* Replace a segment code that has a bundle with future effective date.
* Replace a segment code that has a bundle that has been expired in the past.
* Replace a segment code that has a bundle that have been expired in the future.

Diagram replace

### Use Case 1: replace segment associated with a card {#use-case-1-replace-segment-associated-with-a-card}

1. Cardholder requests a new benefit be associated with their card.
2. Issuer sends a request with a card number, old segment code, new segment code and effective date as an input parameter
3. Benefit Allocation Service API returns the segment benefit bundle codes assigned during replace with effective and expiration dates.

### Use Case 2: replace segment code that has a bundle with future effective date {#use-case-2-replace-segment-code-that-has-a-bundle-with-future-effective-date}

1. Cardholder requests a new benefit be associated with their card.
2. Issuer sends a request with a card number, old segment code, new segment code and effective date as an input parameter
3. Benefit Allocation Service API returns the segment benefit bundle codes assigned during replace with effective and expiration dates.segment bundle codes with the future effective date will be applied with the future effective date

### Use Case 3: replace segment code that has a bundle that has been expired in the past {#use-case-3-replace-segment-code-that-has-a-bundle-that-has-been-expired-in-the-past}

1. Cardholder requests a new benefit be associated with their card.
2. Issuer sends request with card number, old segment code, new segment code and effective date as an input parameter
3. Benefit Allocation Service API returns the segment benefit bundle codes assigned during replace with effective and expiration dates, the segment expired bundle is not added.

### Use Case 4: replace segment code that has a bundle with a future expiry date {#use-case-4-replace-segment-code-that-has-a-bundle-with-a-future-expiry-date}

1. Cardholder requests a new benefit be associated with their card.
2. Issuer sends request with card number, old segment code, new segment code and effective date as an input parameter
3. Benefit Allocation Service API returns the segment benefit bundle codes assigned during replace with effective and expiration dates, future expiration dates will get the future expiration date applied.

## Additional Information {#additional-information}

1. Look at the [API Reference](https://developer.mastercard.com/benefit-allocation-service-mtls/documentation/api-reference/index.md) for information on how to implement this use case.
2. Look at the [Code and Formats](https://developer.mastercard.com/benefit-allocation-service-mtls/documentation/code-and-formats/index.md) for acknowledgement responses.
